Unknown macro: {next_previous_links}
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

XML Schema is one of many asset models supported by the WSO2 Governance Registry. Follow the steps below to add a new Schema to the Governance Registry using the G-Reg Publisher.

  1. Log in to the G-Reg Publisher using the following URL and admin/admin credentials: https://<G-REG_HOST>:<G-REG_PORT>/publisher
  2. Click the Add button of the Policies box as shown below.
  3. Select whether to import the Schema from URL or upload it from a file as shown below.
    select method
  4. If you selected Import Schema from a URL, specify the URL of the Schema, its name and version as shown below.  

    During the Schema import, G-Reg provides WSDL validation (not supporting WSDL2), WS-I Validation, and Schema Validation. WSDL and Schema validation requires a connection to the internet for the very first time, and will not work on systems without internet connectivity. Instead of just storing the required asset in the repository, G-Reg does some other tasks that are specific to the metadata type, and those information are mentioned on metadata type-based descriptions. You can disable WSDL and Schema validation in the <G-REG_HOME>/repository/conf/registry.xml file.

    add schema URL

  5. If you selected Upload Schema from a file, click Browse to select a single Schema file or an archived file (in .zip or .gar extension) containing multiple Schema files to upload it. Then specify its version as shown below. 

    Governance Archives can be used to upload multiple base Schemas at the same time. This can be done by placing all the base Shemas at the top-level folder of the archive (.zip or .gar file), and including the others inside a directory named "schema". For information on uploading a Schema with several associated resources (e.g. WSDLs and other Schemas), see Adding a Schema with other associated assets.

  6. Click Create.
  7. Refresh the screen to view the new Schema artifact you added as shown below or click the Schemas button in the top menu.

Adding a Schema with other associated assets

Follow the instructions below to upload schemas with associated resources from the local filesystem into the WSO2 Governance Registry. 

  1. Save the base Schema in your local file system to a directory (e.g. mySchema).
  2. Identify the target namespace of the base schema. This is usually defined as an attribute of the root element of the schema definition. 
  3. Change the namespace and the path of the Schema in the associated resources accordingly.
  4. Create a folder named "wsdls" inside the mySchema directory. Now, place the WSDLs within the "wsdls" folder.  

    If you are importing a Schema that has other associated Schemas, place the associated Schemas in a directory named "schemas."

  5. Save and close the Schema and all associated files. 
  6. Create a Governance Archive of the mySchema directory (e.g. mySchema.zip or mySchema.gar). 
  7. Upload the archived file to the Governance Registry using the G-Reg Publisher. You can browse and view all the uploaded assets added separately in each asset type menu.
  • No labels