Importing an external XML schema for editing


The mapping tables in web services objects in Developer Studioallow for simple XML editing. For more complex editing, you can use an advanced XML schema editing tool, such as XMLSpy. XML editing tools are not included with AR System. If you have a thorough understanding of XML schemas, you can write them in a simple text editor. An online tutorial on XML schemas is available at http://www.xfront.com/index.html.

After you design an XML schema, you can import it into Developer Studio. After you import it, however, the XML editing features in Developer Studioare disabled. If you want to use Developer Studio to edit your XML schema, you must create the schema within Developer Studio. If you use an old XML schema editor, the namespace for the XML schema might be 2000 or 1999. BMC supports only namespaces of 2001—that is, with the declaration http://www.w3.org/2001/XMLSchema. Using an XSD file with an older namespace might produce unexpected mapping results.

You can use one external XML schema for all of the mappings of one web service. However, this XML schema can include or import other XML schemas. To use multiple XML schemas, create an XML schema that includes or imports all the schemas you want to use.

To import an external XML schema

  1. Open the web service in Developer Studio.
  2. Expand the XML Schema panel.
  3. Specify your XML Schema (XSD file) in the XML Schema field.
    If your schema definition is spread over multiple XSD files interlinked together using import or include, you must type the URL of the topmost XSD file—that is, the one that is not included or imported by others.
    You can also enter a file system path to your XSD file, but the URL to the XSD file is referenced in your generated WSDL file, so your path must be accessible over the network. You should create a web server directory to hold your XSD files and enter the HTTP path to this directory in the XML Schema field.
  4. Click the Reload button.
  5. Select an option from the XML Schema Source list.
    • If you entered a local file system path for your XSD, select Embedded. In this case, AR Systemloads the specified XML schema and all dependent XML schemas. It stores the entire XSD file and all other files that the XSD file includes or imports. The WSDL also has all the XSDs embedded in the types section. This is the default option.
    • If you entered a network-accessible path (HTTP or FTP) for the XSD, select Linked. In this case, AR Systemdoes not store the XSD files, but it does store a reference to the specified schema in the web service object and in the WSDL file. Some WSDL parsing tools (early versions of Microsoft.NET and MSSOAP) do not support these kinds of WSDLs.
    • A system-generated schema is always embedded in the WSDL.
      If your schema definition is spread over multiple XSD files linked together using import or include, you must type the URL of the topmost XSD file—that is, the one that is not included or imported by anyone else.
  6. In the WSDL Operations panel, expand an operation.
  7. In the Data Source Type list, select XML Schema, and click Choose.
  8. Click OK to verify that you want to change the mapping.
  9. Select a start element.
    Separate mappings can be based on separate global elements, but all of them must come from the same XML schema. Developer Studiodisplays a list of global elements and global complex types that either reside in your XSD file or are included or imported into the file.

    web_services_st_element.gif

    If you select an element, the element and all its successors are added as a child of the ROOT element. If you select a complexType, the contents of the complexType is added as a child of the ROOT.

    If you specify and load a different schema, AR Systemverifies that global elements or complex types referred to in the current mappings are compatible with the new schema and informs you of incompatible types. If you agree to update the existing mappings, AR Systemupdates them for you. If there are no overlapping global or complex types, AR Systempreserves the content of the original mapping.

    Developer Studiodoes not support all features of XML schemas, and when using a web service, some restrictions apply to the external WSDL file. For more information about limitations, see Supported-schema-constructs-and-web-service-limitations.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*