5 XML Schemas

This chapter describes how to create, locate, edit, delete, and fix unresolved references to XML Schema resources using the Oracle Service Bus Administration Console.

Schemas describe types for primitive or structured data. XML schemas are an XML vocabulary that describe the rules that XML business data must follow. XML schemas specify the structure of documents, and the data type of each element and attribute contained in the document.

You use XML schemas as references for WSDL resources. You can also use XML schemas in the Message Flow of proxy services to validate an element specified with an XPath expression. See Section 21.24, "Adding Validate Actions."

5.1 Locating XML Schemas

To locate schemas:

  1. Do either of the following:

    • Select Project Explorer to display the Projects View page or the Project/Folder View page. Then navigate through projects and folders to find the XML schema.

    • Select Resource Browser > XML Schemas. The Summary of XML Schemas page displays the information shown in Table 5-1. For a more detailed description of the properties, see Section 5.3, "Editing XML Schemas."

  2. To locate a specific XML schema:

    • Click the Open icon to display additional search filters. If you specify multiple search criteria, only results that match all the criteria will be returned.

    • To restrict the number of items in the list, you can filter by name, path, and namespace. In the Name, Path, and Namespace fields, enter the name, path and namespace of the search target(s), then click Search.

      The path is the project name and the name of the folder in which the XML schema resides.

    • Click View All to remove the search filters and display all XML schemas.

Table 5-1 XML Schema Information

Property Description

XML Schema Name

The unique name assigned to the XML schema. The name is a link to the XML Schema Details page. See Section 5.3, "Editing XML Schemas."

Path

The path is the project name and the name of the folder in which the XML schema resides. It is a link to the project or folder that contains this resource. See Section 4.1.1, "Qualifying Resource Names Using Projects and Folders."

XML Schema Namespace

The namespace used to qualify any of the definitions included in the XML schema.

Options

Click the Delete icon to delete a specific XML schema. See Section 5.4, "Deleting XML Schemas."


5.2 Adding XML Schemas

To add a schema:

  1. If you have not already done so, click Create to create a new session or click Edit to enter an existing session. See Section 3.1, "Using the Change Center."

  2. Select Project Explorer, then select a project or folder in which to add the new XML schema. The Project/Folder View page is displayed.

  3. From the Create Resource list, select XML Schema to display the Create a New XML Schema Resource page.

  4. In the Resource Name field, enter a unique name for this XML schema. This is a required field.

    Follow the Section 2.3, "Resource Naming Restrictions" for naming guidance.

  5. In the Resource Description field, enter a description for the XML schema.

  6. In the XML Schema field, do one of the following:

    • Enter text for the new XML schema.

    • Click Browse to locate and import an existing XML schema.

    • Copy and paste text from an existing XML schema into this field.

    This is a required field.

  7. Click Save. The new XML schema is saved in the current session.

    When you click Save, if there are any unresolved references for the new XML schema, the system displays them. See Section 5.5, "Viewing Unresolved XML Schema References."

  8. To end the session and deploy the configuration to the runtime, click Activate under Change Center.

5.3 Editing XML Schemas

To edit a schema:

  1. If you have not already done so, click Create to create a new session or click Edit to enter an existing session. See Section 3.1, "Using the Change Center."

  2. Locate the XML schema, as described in Section 5.1, "Locating XML Schemas."

  3. Click the XML schema name. The View XML Schema Details page displays the information shown in Table 5-2, Table 5-3, and Table 5-4.

    Table 5-2 XML Schema Details

    Property Description

    Last Modified By

    The user who created this XML schema or imported it into the configuration.

    Last Modified On

    The date and time that the user created this XML schema or imported it into the configuration. Click the date and time link to view the change history of this resource. See Section 4.23, "View Change History Page."

    References

    The number of objects that this XML schema references. If such references exist, click the numeric link to view a list of the objects. See Section 4.22, "Viewing References to Resources."

    Referenced by

    The number of objects that reference this XML schema. If such references exist, click the numeric link to view a list of the objects. For example, if this XML schema is referenced by a specific WSDL, the WSDL is listed as a reference when you click the link. See Section 4.22, "Viewing References to Resources."

    Description

    A description of this XML schema, if one exists.


    The structural view of the XML schema is displayed by default, which includes the information shown in Table 5-3.

    Table 5-3 XML Structure Details

    Property Description

    Target Namespace

    The namespace used to qualify any of the definitions included in the XML schema.

    XML Schema Definitions

    The attributes and groups associated with the XML schema:

    • XML Schema Types

    • XML Schema Elements

    • XML Schema Imports

    • XML Schema Includes/Redefines

    Schema State

    Status of the XML schema:

    • Valid

      An XML schema is shown as valid when all of the locations for XML schemas included by the current XML schema are specified. Furthermore, all of the locations for nested XML schemas (XML schemas subsequently included by the included XML schemas) are specified.

    • Invalid

      An XML schema is shown as invalid when one or more of the locations for the XML schema is not specified. Additionally, the location for one or more nested XML schemas (XML schemas subsequently included by the included XML schemas) may not be specified. To resolve an invalid XML schema, click Edit References. See Section 5.6, "Resolving Unresolved XML Schema References."


  4. Click Text View to display a text view of the XML schema details. The text view includes the information shown in Table 5-4.

    Table 5-4 XML Schema Text Details

    Property Description

    Target Namespace

    The namespace used to qualify any of the definitions included in the XML schema.

    XML Schema

    The text for this XML schema.


  5. To make changes to the fields, click Edit. See Section 5.2, "Adding XML Schemas" for descriptions of the fields.

  6. Make the appropriate edits.

  7. Click Save to commit the updates in the current session.

  8. To end the session and deploy the configuration to the runtime, click Activate under Change Center.

5.4 Deleting XML Schemas

To delete a schema:

  1. If you have not already done so, click Create to create a new session or click Edit to enter an existing session. See Section 3.1, "Using the Change Center."

  2. Select Resource Browser > XML Schemas.

  3. Click the Delete icon in the Options field of the XML schema you want to delete. The XML schema is deleted in the current session. A Deletion Warning icon is displayed when other resources reference this resource. You can delete the resource with a warning confirmation. This might result in conflicts due to unresolved references to the deleted resource.

  4. To end the session and deploy the configuration to the runtime, click Activate under Change Center.

5.5 Viewing Unresolved XML Schema References

For each unresolved XML schema reference, this page displays the information shown in Table 5-5.

Table 5-5 Unresolved XML Schema Details

Property Description

Schema Name

The unique name assigned to the XML schema. Click the name of a specific XML schema to view details for that XML schema. See Section 5.3, "Editing XML Schemas."

Namespace

The namespace used to qualify any of the definitions included in the XML schema.


To locate a specific reference:

  • Resort the list. Click an underlined column name. Ascending and descending arrows indicate the sort order. Click the column name to change the sort order.

  • Scroll through the pages. Use the page controls above or below the table. Go to a page by selecting the page number or by using the arrow buttons to go to the next, previous, first, or last page.

5.6 Resolving Unresolved XML Schema References

Use the Edit the References of an XML Schema Resource page to resolve unresolved XML schema references by configuring the mapping for XML schema references such as XML schema imports.

  1. If you have not already done so, click Create to create a new session or click Edit to enter an existing session. See Section 3.1, "Using the Change Center."

  2. On the Summary of XML Schemas page, in the XML Schema Name column, click the appropriate XML schema name to view details of the unresolved reference. The View XML Schema Details page is displayed.

  3. Click Edit References to display the Edit the References of an XML Schema Resource page.

  4. In the Resource Type field, select XML Schema.

  5. Click Browse. The XML Schema Browser is displayed.

  6. In the XML Schema Browser, select an XML schema, then select a definition from the Definitions pane.

  7. Click Submit. The XML schema you selected is displayed in the Resource Name field.

  8. Click Save to resolve the reference.

  9. On the XML Schema Details page, click OK. The state of the XML schema is displayed as Valid.