Entries that collect data through an earlier collected XML structure

Whenever an entry that collects its data through an MQSeries request collects data in an XML with substructures, the data from the substructure can be extracted by means of subentries. Consequently, such an entry can only be a subentry.

Whenever such a subentry is called in the model document, the XML MQSeries Connection will treat the XML substructure in exactly the same way as the XML File Connection treats its data; the subentries are identified via their tag, and this tag must be specified via the DATA_RETRIEVAL clause. The XML File Connection will search for a subentry within its parent entry in textual order. While doing so it ignores all other XML elements, be it elements with unknown tags, comments, processing instructions or character data. Ignoring comments and processing instructions follows from the XML specifications. Ignoring the other elements has the following reasons:

In XML data, each subentry relation is completely specified by inclusion of an XML element within another. This means that subentries cannot be selected via parameters. Consequently, ITP does not allow WHERE clauses in the DEFINE_SUBENTRIES for XML entries.

Example returned XML substructure

<item>
<CustomerNumber>1234</CustomerNumber>
<Prefix/>
<Surname>Benitas</Surname>
<Initials>D.A.</Initials>
<Gender>M</Gender>
<Address>
<!—-Address of customer 1234-->
<Street></Street>
<Number></Number>
<Postal_code></Postal_code>
<City></City>
</Address>
</item>

The data of the Address must be retrieved through a subentry.

Example DID document

DEFINE_DIDMODULE
NAME "SAPMODULE"
CONNECTION MQXML

DEFINE_ENTRY
NAME Customer
MODEL_DOC_STATEMENT WITH
DATA_RETRIEVAL "GetCustomer"
KEY_RETRIEVAL "GetCustomerKeys"
CALLING_CONVENTION MQREQUEST
RESULT_PATH "biztalk_1//body//@(ENTRY:RETRIEVAL)//CUSTOMER//item"

DEFINE
PARAMS "<CUST_ID>@(PAR:CustomerNumber)</CUST_ID>"
COMMENT "Get the customer with the passed parameter"
END_DEFINE

DEFINE_PARAMETERS
CustomerNumber C_CHAR LENGTH(255)
END_DEFINE_PARAMETERS

DEFINE_FIELDS
Customer_number C_CHAR LENGTH(255) DATABASE_FIELD "CustomerNumber"
Surname C_CHAR LENGTH(255)
Prefix C_CHAR LENGTH(255)
Initials C_CHAR LENGTH(255)
Gender C_CHAR LENGTH(255)
END_DEFINE_FIELDS

DEFINE_SUBENTRIES
Address
END_DEFINE_SUBENTRIES

END_DEFINE_ENTRY

DEFINE_ENTRY
NAME Address
MODEL_DOC_STATEMENT WITH
DATA_RETRIEVAL Address
KEY_RETRIEVAL *none
CALLING_CONVENTION SUBELEMENT

DEFINE_FIELDS
Street C_CHAR LENGTH(255) DATABASE_FIELD "Street"
Number DOUBLE DATABASE_FIELD "Number"
Postal_code C_CHAR LENGTH(255) DATABASE_FIELD "Postal_code"
City C_CHAR LENGTH(255) DATABASE_FIELD "City"
END_DEFINE_FIELDS

END_DEFINE_ENTRY

END_DEFINE_DIDMODULE (* "SAPMODULE" *)