Rational Developer for System z

Generation of Composite XML Schemas from Multiple Language Structures

This topic describes how composite XML Schemas are generated by the Enterprise Service Tools batch processor when multiple language structures are specified for the request and response interfaces of an enterprise application program. The InputMessage and OutputMessage elements of the ServiceSpecification.xml file are used to specify each language structure for the request and response messages respectively.
The Enterprise Service Tools batch processor takes the following steps to generate a composite XML Schema (assume just the request/input message for these steps):
  1. Each InputMessage element is processed and the referenced language structure (nativeTypeName) is converted into an equivalent complex type and stored in the request XML Schema. The name of each generated complex type is not settable.
  2. For each complex type created in step 1, an XML element is defined and stored in the request XML Schema. The minOccurs and maxOccurs attributes of each XML element are set to the values of the lowerBound and upperBound attributes of the corresponding InputMessage element. The name of each XML element is set to the value of the xmlEleName attribute in the respective InputMessage element. If the xmlEleName attribute is not specified or its value is non-unique with respect to other InputMessage elements, a generated name is used.
    Note: When the IMS™ SOAP Gateway Web service wizard is used, the xmlEleName attribute is never specified
  3. Once a complex type and an XML element has been defined for each language structure, a single, top-level complex type is defined that contains all the XML elements in the same order as they appeared in the series of InputMessage elements.
    Note: when the IMS SOAP Gateway Web service wizard is used, the order of the InputMessage element series is determined by the layout specified on the “IMS Message Layouts” page.
  4. A global XML element is defined whose type is the top-level complex type created in step 3. The name of the global element is set to the value of the XsdSpecIn/@xsdEleName attribute.
    Note: A generated named is used when the xsdEleName attribute is not specified.

Table 1 illustrates the specification of multiple InputMessage elements and the resulting composite XML Schema.

Table 1. Example of a Composite XML Schema Resulting from the Specification of Multiple InputMessage Elements
ServiceSpecification.xml Composite XML Schema
<InputMessage 
  nativeTypeName="REQ-HEADER"
  xmlEleName="RequestHeader"
  lowerBound="1" upperBound="1">
  <ItemSelectionArray ../>

<InputMessage
  nativeTypeName="REQ-BODY"
  xmlEleName="REQ-BODY"
  

lowerBound="1"upperBound="10">
  <ItemSelectionArray ../>
</InputMessage >


<InputMessage
  nativeTypeName="REQ-SUM"
  xmlEleName="RequestSummary"
  lowerBound="1" upperBound="1">
  <ItemSelectionArray ../>
</InputMessage >

<XsdSpecIn 
  xsdEleName="ServiceRequest" ../>
<complexType name="REQ_HEADER">
  <sequence ../>
</complexType>

<complexType name="REQ_BODY">
  <sequence ../>
</complexType>

<complexType name="REQ_SUM">
  <sequence ../>
</complexType>

<complexType   
  name="EIS_COMPOSITE_MESSAGE">
  <sequence>
    <element name="RequestHeader"
      type="p:REQ_HEADER"
      minOccurs="1" maxOccurs="1" />
    <element name="RequestBody"
      type="p:REQ_BODY"
      minOccurs="1" maxOccurs="10" />
    <element name="RequestSummary"
      type="p:REQ_SUMMARY"
      minOccurs="1" maxOccurs="1" />
   </sequence>
</complexType>

<element name="ServiceRequest"
  type="p:EIS_COMPOSITE_MESSAGE" >
</element>

Limitations and Error Conditions

This section describes the Batch Processor limitations and restrictions on generation of composite XML Schemas from collections of language structures.

Multiple InputMessage and OutputMessages are not allowed if mapping files are specified instead of language source files (that is, meet-in-middle is not supported since this function deals with generation of XSDs).

Multiple InputOutputMessage elements are not supported. Use multiple InputMessage and OutputMessage elements instead.

A language structure may not be specified more than once in a series of InputMessage or OutputMessage elements. This means that an XML Schema complex type derived from a language structure cannot reappear later in an XML message with identical or different field level inclusions and/or exclusions.

All language structures specified on InputMessage and OutputMessage elements (nativeTypeName) must have unique names regardless of the language source file (importFile) they reside in.

All XML element names specified on InputMessage and OutputMessage elements (xmlEleName) must be unique with respective to the other InputMessage or OutputMessage elements. It is not an error to have a XML element name that appears both in a series of InputMessage and OutputMessage elements.

Important: Inter-language structure dependencies are not supported.

For example, an OCCURS DEPENDING ON (ODO) subject cannot refer to an ODO object in another structure.


Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)