XI Adapter 4.6 | webMethods XI Adapter Documentation | webMethods XI Adapter Installation and User’s Documentation | Services | Extending the Outbound Service
 
Extending the Outbound Service
If you generated an outbound service stub, you must extend the stub to make the service interact with your systems.
To extend the outbound service stub
1. Start Designer and navigate to the outbound service stub.
2. Modify the flow logic of the outbound service stub to interact with your backend system as appropriate (for example, to ask your backend system for the MessageObject). For example:
3. Map the MessageObject to the outbound Document Type that is defined in the input section of the outbound service stub. For example:
4. You can map the serviceName, messageID, queueID, and traceLevel input fields of the outboundMessageObject service.
5. The delivery mode of the interface from which the outbound service stub was generated decides the next action:
*If delivery mode is synchronous, the outbound service stub already maps the returned reply MessageObject to the appropriate inbound or fault Document Type.
*If delivery mode is asynchronous, you can create a separate inbound service that receives any results from the business partner if the task runs successfully.
6. Map the other output fields of the pub.xi.Router:outboundMessageObject service as follows:
a. If you want to extract other information from the message header of the reply MessageObject, such as TimeSent or the message ID, map the appropriate fields of the outboundMessageObject service to pipeline variables.
b. If you want to extract trace information, if there is any, from the message header of the reply MessageObject, modify the outbound service to check whether the SAP:TraceHeader field of the outboundMessageObject service exists. TheSAP:TraceHeader field exists only if the SAP PI/PO Server has added trace information to the MessageObject.
c. If you want to extract technical error information, if there is any, from the error header of the reply MessageObject, modify the outbound service to check whether the SAP:ErrorHeader field of the outboundMessageObject service exists. The SAP:ErrorHeader field exists only if a technical error has occurred. You can map the following fields to pipeline variables:
Field
Contents
SAP:Code
Error code that consists of a category and an ID, separated by a period (for example, ROUTING.NO_RECEIVER_CASE_BE). See the SAP PI/PO Server documentation for a complete list of error codes.
SAP:Text
Message text for the error code. See the SAP PI/PO Server documentation for a complete list of messages.
7. On the Permissions tab for the service, make sure Enforce Execute ACL area is set to the For top-level service only (Recommended) option.