Managing custom XML

Perform the steps in this section only if you will be using a custom XML format.

XML (Extensible Markup Language) is the universal format for structured documents and data on the Web. Using the Manage XML Protocols page, you can create and manage custom XML formats that can be added to the list of available Document Flow Definitions.

An XML format defines the paths within a set of XML documents. This enables the Document Manager to retrieve the values that uniquely identify an incoming document and access information within the document necessary for proper routing and processing.

Creating an XML format is a multi-step process. You must:

  1. Create a protocol for the format and associate it with a package or packages
  2. Create a document flow for the format and associate it with the newly created protocol
  3. Create the format

You then create a valid interaction for the newly created format.

These steps are described in the sections that follow. You can also find an example of these steps in Setting up the hub for custom XML documents.

Creating a CustomXML protocol definition format

The following steps describe how to create a custom XML protocol definition format:

  1. Click Hub Admin > Document Flow Definitions > Create Document Flow Definition.
    Figure 26. Create Document Flow Definitions page
  2. For Document flow type, select Protocol.
  3. For Code, enter the value for the type of object you selected in the previous step. For example, you might want to enter XML.
  4. For Name, enter an identifier for the document flow definition. For example, for a custom XML protocol, you could enter Custom_XML. This field is required.
  5. For Version, enter 1.0.
  6. Enter an optional description of the protocol.
  7. Set Document Level to No, because you are defining a protocol, rather than a document flow (which you will define in the next section).
  8. Set Status to Enabled.
  9. Set Visibility for this protocol. You will probably want it to be visible to all participants.
  10. Select the packages in which this new protocol will be wrapped. For example, if you want this protocol to be associated with all three packages, select Package: AS, Package: None, and Package: Backend Integration.
  11. Click Save.

Creating a document definition flow

Next, use the Create Document Flow Definition page again to create a document flow.

  1. Click Hub Admin > Document Flow Definitions > Create Document Flow Definition.
  2. For Document flow type, select Document Flow.
  3. For Code, enter the value for the type of object (document flow) you selected in the previous step.
  4. For Name, enter an identifier for the document flow definition. For example, you could enter XML_Tester as a name for the document flow. This field is required.
  5. For Version, enter 1.0.
  6. Enter an optional description of the protocol.
  7. Set Document Level to Yes (because you are defining a document level).
  8. Set Status to Enabled.
  9. Set Visibility for this flow. You will probably want it to be visible to all participants.
  10. Click the folder icon to expand each package you selected in the previous procedure. Expand the folder and select the name of the protocol you created in the previous section (for example, Protocol: CustomXML.).
  11. Click Save.

The following is an example of what the AS Package portion of the Manage Document Flow Definitions page would look like if you created a protocol of CustomXML, associated the protocol with AS, None, and Backend Integration packaging, and created a document flow of XML_Tester:

Figure 27. Document Flow Definition page with new Custom XML protocol and document flow added

Creating an XML format

After you create a custom XML protocol (and associate it with a package or set of packages) and create an associated document flow, you are ready to create the XML format.

To create an XML format, use the following procedure.

  1. Click Hub Admin > Hub Configuration > XML Formats.
  2. Click Create XML Format.
    Figure 28. The View XML Format page
  3. For Routing Format, select the document flow definition with which this format will be associated.
  4. For File Type, select XML.
    Note: XML is the only option available for file type.
  5. For Identifier Type, select the element used to identify the incoming document type. The choices are DTD, Name Space, or Root Tag.
  6. For each field for which a choice of types is offered, select either Element Path, which is the path to the value in the document, or Constant, which is the actual value in the document. Then provide a value.
    1. For Source/Target Business ID, enter the path of the business ID. This field is required.
    2. For Source Document Flow & Version, enter an expression that defines the path to the Document Flow and Version value within the XML document. This field is required.
    3. For Document Identifier, enter the path for the document ID number.
    4. For Document Timestamp, enter the path for the document creation time stamp.
    5. For Duplicate Check Key 1-5, enter paths used to identify the routing of a duplicate document.
  7. Click Save.

Using validation maps

WebSphere Business Integration Connect uses validation maps to validate the structure of RosettaNet or XML documents. If you have no need to import validation maps, skip ahead to Creating interactions.

Adding validation maps

An action can have an associated validation map to ensure that the destination participant or back-end system can parse the document. Note that a validation map only validates the structure of the document. It does not validate the contents of the message.

Note: Once you associate a validation map with a Document Flow Definition, you cannot disassociate them.

To add a new validation map to the hub, use the following procedure.

  1. Save the validation map file to the hub or to a location from which WebSphere Business Integration Connect can read files
  2. Click Hub Admin > Hub Configuration > Validation Maps.
  3. Click Create.
  4. Type a description of the validation map. Choose the path and name of the schema file you want to use to validate documents.
  5. Click Save.

Associating maps with Document Flow Definitions

To associate a validation map with a Document Flow Definition, use the following procedure.

  1. Click Hub Admin > Hub Configuration > Validation Maps. The Console displays the Manage Maps page.
  2. Click the magnifying glass icon next to the validation map you want to associate with the Document Flow Definition.
  3. Click the folder icon to individually expand to the Action level, or select All to expand the entire tree.
  4. Select the Document Flow Definition you want associated with the validation map.
  5. Click Submit.

Copyright IBM Corp. 2003, 2004