Services
Associating Sender Endpoint with Outbound Service
Procedure
- Start Integration Server Administrator.
- In the Adapters menu in Integration Server Administrator's navigation area, click webMethods Adapter for PI/PO. The system displays the Servers page.
- In the webMethods Adapter for PI/PO navigation area, click Services. The system displays the Services page.
-
Click
Associate Sender Endpoint with Outbound Service
(Generate Stub). The system displays the
Add Sender Endpoint
Association (Generate Stub) page with the following fields in
Outbound Service Associations.
Field Description Sender Endpoint Business System Select the name of the business system to associate the outbound service with the sender endpoint. Interface Select the name and namespace of the interface to associate the outbound service with the sender endpoint. Outbound Service Service Specify the name of the service to execute at the sender endpoint. Create the outbound service by typing a name that is not in use or use an existing outbound service by typing the name of the existing service. Package Select the package in which to store the new service or select the package that contains the existing service to execute at the sender endpoint.
-
Click
Add.
- If the Service is not in use, the system generates an outbound service stub using the specification it generated from the interface identified in the sender endpoint, then stores the service in the package you selected.
- If the SLD access is enabled and the
Integration Server
instance is registered in SAP SLD, the system adds SAP_XIAdapterService object
that represents the outbound service to the SAP SLD.
Note: You can use XI Adapter without registering the Integration Server instance in the SAP SLD. For more information, see watt.xi.sld.access.
- The system displays the Services page and adds the Outbound Service Associations you just created to the list.
Extending the Outbound Service
About this task
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
Procedure
- Start Designer and navigate to the outbound service stub.
-
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:
-
Map the MessageObject to the
outbound Document Type that is defined in the input section of the outbound
service stub. For example:
- You can map the serviceName, messageID, queueID, and traceLevel input fields of the outboundMessageObject service.
-
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.
- If delivery mode is synchronous, the outbound service stub
already maps the returned reply MessageObject to the appropriate inbound or
fault Document Type.
-
Map the other output fields of the
pub.xi.Router:outboundMessageObject
service as follows:
- 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.
- 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.
-
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.
- On the Permissions tab for the service, make sure Enforce Execute ACL area is set to the For top-level service only (Recommended) option.
Associating Receiver Endpoint with Inbound Service
Procedure
- Start Integration Server Administrator.
- In the Adapters menu in Integration Server Administrator's navigation area, click webMethods Adapter for PI/PO. The system displays the Servers page.
- In the webMethods Adapter for PI/PO navigation area, click Services. The system displays the Services page.
-
Click
Associate Receiver Endpoint with Inbound Service
(Generate Stub). The system displays the
Add Receiver Endpoint
Association (Generate Stub) page.
Field Description Receiver Endpoint Business System Select the name of the business system to associate the inbound service with the receiver endpoint. Interface Select the name and namespace of the interface to associate the inbound service with the receiver endpoint. Inbound Service Service Specify the name of the service to execute at the receiver endpoint. Create the inbound service by typing a name that is not in use by any existing service or use an existing inbound service by typing the name of the existing service. Package Select the package in which to store the new service or select the package that contains the existing service to execute at the receiver endpoint.
-
Click
Add.
- If the Service is not in use, the system generates an inbound service stub using the specification it generated from the interface identified in the receiver endpoint, then stores the service in the package you selected.
- If the SLD access is enabled and the
Integration Server
instance is registered in SAP SLD, the system adds the following objects to the
SAP SLD:
- A SAP_XIAdapterService object that represents the inbound
service.
Note: You can use XI Adapter without registering the Integration Server instance in the SAP SLD. For more information, see watt.xi.sld.access.
- A SAP_HTTPServicePort object that specifies the URL for XI Adapter's pub.xi.Router:inboundMessageObject service. The URL is : http://Integration Server_host:Integration Server_port/invoke/pub.xi.Router/inboundMessageObject.
- A SAP_XIAdapterService object that represents the inbound
service.
- The system displays the Services page and adds the Inbound Service Associations you just created to the list.
Extending the Inbound Service
About this task
If you generated an inbound service stub, you must extend the stub to make the service interact with your systems.
To extend the inbound service stub
Procedure
- Open Designer and navigate to the inbound service stub.
- Modify the flow logic of the inbound service stub to interact with your backend system as appropriate. The inbound service and your backend system must process the task that is defined by the interface that is specified in the receiver endpoint.
-
The next step depends on whether
the inbound service you are creating is synchronous or asynchronous.
- If you are creating a
synchronous inbound service, modify the service to add the results data in its
payloadOut field if the task runs
successfully. Modify the service to add application error data in its
applicationError field if any application
errors occur. For example:
- If you are creating an asynchronous inbound service, you can create a separate outbound service that returns any results data to the business partner if the task runs successfully.
- If you are creating a
synchronous inbound service, modify the service to add the results data in its
payloadOut field if the task runs
successfully. Modify the service to add application error data in its
applicationError field if any application
errors occur. For example:
-
Modify the inbound service to exit
on failure if there is a technical error. For example:
Important: If you do not modify the service to exit on failure, the message will be lost. The sending business partner will not receive an error message and will erroneously assume that the message was delivered successfully.
- On the Permissions tab for the service, make sure Enforce Execute ACL area is set to the For top-level service only (Recommended) option.
Viewing Services
About this task
To view Services
Procedure
- Start Integration Server Administrator.
- In the Adapters menu in Integration Server Administrator's navigation area, click webMethods Adapter for PI/PO. The system displays the Servers page.
-
In the
webMethods Adapter
for PI/PO navigation area, click
Services.
The system displays the
Services
page.
The Services page lists outbound services you associate with sender endpoints and inbound services you associate with receiver endpoints.
- The Services page lists the Business System, Name and Namespace of the Interface, and depending on whether the service is inbound or outbound displays the fully qualified name of the Inbound Service or Outbound Service respectively.
- You can sort the table by a particular column by clicking the column's heading.
- You can sort the column in ascending or descending order.
- You can edit a service from the list by clicking
icon in the
Edit column.
- You remove a service from the list by clicking
icon in the
Delete column.
Note: Before you can delete an interface, you must delete all service endpoint associations that specify the interface. - The page also lists the link to Associate Receiver Endpoint with Inbound Service (Generate Stub) and Associate Sender Endpoint with Outbound Service (Generate Stub).