In the 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 that is needed for the specific function. The RESULT_PATH determines the path in the XML tree to the result of the function.
The keys can be referred to in the content template with the @(ENTRY:<name_key>) construction. The keys that are referred to in our example content template are made bold.
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" *)