Sample DID document with the XML MQSeries connection
In the following example DID document, the DATA_RETRIEVAL and KEY_RETRIEVAL keys can be used to distinguish the type of request (data retrieval or key retrieval). The DEFINE section holds a PARAMS definition that maps the parameters of the entry to the format needed for the specific function. The RESULT_PATH determines the path in the XML tree to the result of the function.
You can refer to the keys in the content template with the @(ENTRY:<name_key>) construction. The keys that the example content template refers to are bold in the following sample DID document.
DEFINE_DID
NAME "SAPEXAMPLE"
IDENTIFICATION SAP
DIDMODULE_LIST
"SAPMODULE"
MAIN_ENTRY_LIST
Customer FROM SAPMODULE
END_DEFINE_DID (* "SAPEXAMPLE" *)
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")
Prefix C_CHAR LENGTH(255)
Surname C_CHAR LENGTH(255)
Initials C_CHAR LENGTH(255)
Gender C_CHAR LENGTH(255)
END_DEFINE_FIELDS
END_DEFINE_ENTRY
END_DEFINE_DIDMODULE (* "SAPMODULE" *)