Defining an XML document with a DTD

This use case explains how to define an XML document with a DTD.

Before you begin

You must have an existing project in IBM® webMethods Integration.
Note: webMethods B2B Integration does not support processing XML External Entities (XXE) within DTD files when you create XML documents. webMethods B2B Integration rejects any DTD that references external entities to ensure secure XML handling.

About this task

You can define an XML document with a DTD using one of the following options:
  • A plain DTD document, a compressed file that contains a DTD document, or
  • A URL where a DTD is hosted, based on which you define an XML document.
In this example, define an XML document based on a DTD purchaseorder1 that is project-aware of the project B2B_Test in webMethods Integration and uses a DTD POAccept.DTD.

Procedure

  1. In webMethods B2B Integration, from the side navigation menu, click Assets > Business document.
  2. Click the Add document icon and select XML.
  3. Provide the name and description for the document. Refer to IBM webMethods Integration and select the project B2B_Test, and click Next.
  4. Select No to create an XML document without referring to an existing document type from the selected project.
  5. Select DTD Document to build the XML document.
  6. Select the method to upload the DTD document. Either use a plain DTD document that is available locally, a DTD in a compressed format, or a URL that hosts the DTD document.

    If you upload a compressed DTD document, you must provide the DTD document path along with the file name within the compressed file.

    For example, if the DTD document is within several levels of sub folders, specify the exact file path and the file name of the DTD document.
    Note: The DTD document or compressed file that contains the DTD document must be less than or equal to 5 MB.
  7. Click Next.
  8. Select a root DTD with which you want to create the XML file and click Save.

What to do next

  • After you add the XML document, manually extract the senderID and receiverID, for webMethods B2B Integration to recognize the documents.
    Note: After adding XML documents using DTD or XSD or a sample XML, you must explicitly add the processVersion attribute in the Pipeline matching section under Identifiers for each document. This step is required for webMethods B2B Integration to recognize RosettaNet messages.
  • Activate the XML document and test it.

The respective document type is also created on webMethods Integration.

To update the XML document, click the Edit icon on the document details page. You can update the name, description, project, and document type.

Go to the respective pages to edit the Identifiers, Attributes, Namespaces, and Options.