This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.
Creating a Governance Archive
WSO2 Governance Registry only allows you to upload one resource at a time. However, a WSDL (or Schema) file can have several imported resources (Schemas and WSDLs) that are required to be uploaded all at once.
Follow the instructions below to create an archive.
1. Create a zipped-archive of the WSDL (or Schema) file you want to upload including the imported Schemas and WSDLs placed in a proper directory structure.
2. Save the WSDL to your local file system to a folder named, for example, "myWSDL."
3. Open the WSDL file and identify the directory structure of the imports. Make absolute Schema locations relative.
4. Replace the Schema locations to reflect a relative directory structure. For example, replace with schemas/xsd1.xsd
.
5. Create a folder named "schemas" inside the folder myWSDL. Now, save the Schemas, within the "schemas" folder. For example, save as xsd0.xsd
.
6. Open each Schema file and fix the locations of the imported Schemas. Make the absolute Schema locations in the Schema files relative as well. For example, replace with xsd0.xsd
.
7. Save and close the WSDL and Schema files, if you haven't done so. Then, create a zip archive of the folder "myWSDL." Name it, for example, "myZIP.zip." Change the extension of this file from .zip
to .gar
. Your file should now have the name "myZIP.gar."
8. Upload the ""myZIP.gar"" to the registry, through the "Browse" sub menu under the "Resources" menu. Now, you should see your WSDL listed under the "WSDLs" section under the "List" sub-menu of the "Metadata" menu.
Tip
To upload a Schema file (with imports), you need to follow the above mentioned steps starting from Step 4. You should save the base schema file outside the "schemas" folder. This is just as the same as saving the base WSDL file. Also, if you are importing a WSDL that imports other WSDLs, you need to place the imported WSDLs in a folder named "wsdls."
Tip
Governance Archives can be used to upload multiple base WSDLs (and Schemas) at the same time. This can be done by placing all the base WSDLs and base Schemas at the top-level folder, and including the others inside folders named "schemas" and "wsdls" as appropriate.
See an example of uploading Schemas with Imports from Local Filesystem into the Registry here.