XML Validation Service

The XML Validation service validates XML documents in process data. It can validate against a schema or a DTD, or it can verify that the document is well-formed.

The following table provides an overview of the XML Validation service:

Category Description
System name XMLValidator WellFormed
Graphical Process Modeler (GPM) categories All Services, Translation
Description Validates XML documents in process data. It can validate against a schema or a DTD, or verify that the document is well-formed.
Business usage Used within business processes to perform validation of an XML document passed to the business process or generated within the business process.
Usage example You have a business process that performs the following:
  • Translates an incoming EDI document
  • Converts the translated document to XML format
  • Feeds the XML document to an enterprise application
You could use the XML Validation service to validate the format of the XML document before feeding it to the enterprise application.
Preconfigured? Yes
Requires third-party files? No
Platform availability All supported Sterling B2B Integrator platforms
Related services No
Application requirements If the XML document will be verified using a DTD or schema, then you must specify one of the following in the XML document:
  • A reference to the location of the DTD or schema
  • An actual DTD
If you specify a reference to the DTD or schema location, the DTD or schema must be checked in to Sterling B2B Integrator.
Initiates business processes? No
Invocation Runs as part of a business process.
Business process context considerations Uses the primary document and can validate documents in process data.
Returned status values Returned status values:
  • Success – Transformation was successful.
  • Error – Errors were encountered during transformation or transformation could not be performed.
See the Workflow Context Status report for further details.
Restrictions No
Persistence level None
Testing considerations None

Requirements

The DTDs and schemas are checked in Sterling B2B Integrator. If you want to validate using a schema or DTD, you must specify either the location and name of the schema or DTD, or the actual DTD, in the XML document (which is the primary document of the BPML).

How the XML Validation Service Works

If you have a business process that uses the translation service to create XML, you can use the XML Validation service to check the output of that service to verify its credibility before operating on it.

Business Process Example

The illustration shows an example business process that uses the XML Validation service:

<process name=”XMLVal_WellFrmd">
  <sequence>
   <operation name="Validate">
      <participant name="XMLValidator"/>
      <output message="outputMessage">
       <assign to="." from="*"></assign>
       <assign to ="xml_input_validation">WELLFORMED</assign>
     </output>
      <input message="inputMessage">
       <assign to="." from="*"></assign>
     </input>
    </operation>
 </sequence> 
</process>

Implementing the XML Validation Service

To implement the XML Validation service, complete the following tasks:
  1. Activate your license for the XML Validation service. See An Overview of Implementing Services.
  2. Create an XML Validation service configuration. See Creating a Service Configuration.
  3. Configure the XML Validation service. See Configuring the XML Validation Service.
  4. Check in any DTDs or schemas that will be used to validate the XML documents.
  5. Use the XML Validation service in a business process.

Configuring the XML Validation Service

To configure the XML Validation service, you must specify field settings in Sterling B2B Integrator and using BPML. See Creating a Service Configuration.

Sterling B2B Integrator Configuration

The following table describes the fields used to configure the XML Validation service in Sterling B2B Integrator:

Field Description
Name Unique and meaningful name for the service configuration. Required.
Description Meaningful description for the service configuration, for reference purposes. Required.
Select a Group Select one of the options:
  • None – You do not want to include this configuration in a group at this time.
  • Create New Group – You can enter a name for a new group in this field, which will then be created along with this configuration.
  • Select Group – If you have already created one or more groups for this service type, they are displayed in the list. Select a group from the list.
Note: See Using Service Groups.
Input Validation(xml_input_validation) Specifies the method used for validation of the input XML file. Required. Valid values are:
  • Validate well-formed – Validates that the input file is a well-formed XML document
  • Validate using a DTD – Validates the input file against a DTD
  • Validate using an XML schema – Validates the input file against an XML schema
Note: This parameter can be overwritten using BPML.

BPML Configuration

The following table describes the fields used to configure the XML Validation service using BPML:

Field Description
xml_input_validation Specifies the method used for validation of the input XML file. Required. Valid values are:
  • WELLFORMED – Validates that the input file is a well-formed XML document
  • DTD – Validates the input file against a DTD
  • SCHEMA – Validates the input file against an XML schema
Note: This parameter is set in the Sterling B2B Integrator configuration, but can be overwritten using BPML.
xml_input_from Specifies the location of the XML to validate. Optional. Valid values:
  • Procdata – Validate the XML in process data
  • Primdoc – Validate the XML in the primary document
Default is Primdoc.
input_pd_xpath Identifies the XPath location of the XML to validate. Required if xml_input_from is set to Procdata.