Show TOC

Defining Query for Plain HTTP Inbound ChannelLocate this document in the navigation structure

Use

You communicate with the plain HTTP inbound channel of the Integration Engine using an HTTP address. You encode the control data in the HTTP address as parameters, to enable a message to be created. These parameters are mandatory.

The HTTP body is used as the payload for the message. The payload does not contain an envelope with control data for the message you want to create.

Prerequisites
  • The HTTP service shipped by SAP at the HTTP integration inbound channel is called /sap/xi/adapter_plain.

    More information: HTTP Service

  • The service must be assigned to the client in which the Integration Engine is running.
  • The class CL_HTTP_PLAIN_INBOUND is provided as a request handler that processes an HTTP request synchronously (client expects a response) or asynchronously.
  • Multipart documents and HTTP requests with an empty HTTP body are not accepted and receive a response with status code 500 or 204.
  • The payload must be sent as an XML document with code page UTF-8, so that all services of the Integration Engine can process the document.
Procedure
  1. Use the following syntax for inbound queries in the plain HTTP adapter:

    http://<hostname:port>/<path>?<query-string>

  2. If you are using special characters such as forward slash (/), hyphen (-), period (.), or colon (:) in the query string, you must encode these with escape characters (for example,
    %2F/%2D%2E%3A
    for , for -, for .,and for :).
  3. Enter the following obligatory parameters for the query string:
    • Sender namespace ?namespace=<namespace>

      Namespace of the sender interface.

    • Sender interface &interface=<interface>

      Interface of the HTTP payload.

    • Sender service &service=<service>

      You define the sender service to identify the sender.

      In XI message protocol 2.0, this parameter corresponds to the parameter bs.

  4. Enter the following optional parameters for the query string:

    These parameters affect the runtime response of the message in the Integration Engine.

    • Sender party &party=<party>
    • Sender agency &agency=<agency>

      Issuing agency of the sender.

    • Sender scheme &scheme=<scheme>

      Identification scheme of the sender.

      If you do not enter values for agency and scheme, the following default values are used:

      • agency=http://sap.com/xi/XI
      • scheme=XIParty
    • Quality of service (optional) &qos=<EO|BE|EOIO>
      In the case of BE, the client is sent the end status of processing; in the case of EO and
      EOIO
      , processing occurs asynchronously and the client only receives a confirmation of receipt with HTTP status 200.

      If you do not define this parameter, it is given the default value BE.

    • Queue ID &queueid=<queueid>

      Name of the queue, only for EOIO.

      The queue ID can have a maximum of 16 characters. If the first eight characters contain SAP_ALE_, this is removed since this value is reserved by SAP and is for internal use.

      More information: Quality of Service

    • Message ID &msgguid=<msgguid>

      For EO and EOIO, you can also enter the message ID for Exactly Once processing using the parameter msgguid.

      If an ID is used more than once, the server returns an HTTP status 500.

      The message ID is 32 characters long and must only comprise the characters 0 to 9 and A to F. It is persisted and can therefore be checked for duplication. If the HTTP client (the sender system) cannot provide a message ID, the plain HTTP adapter generates a message ID and forwards it to the application through the Integration Engine. You can then carry out a duplication check in the application at document level, for example, by using the order number.

Result
  • The instantiated message is transferred to the Integration Engine. In mode BE (synchronous processing) the system waits for the response from the Integration Engine. If processing is successful, the payload of the message is sent as an HTTP response. If not, the system returns an error.
  • If processing is successful, the HTTP client has the return code 200. Otherwise, it has the return code 500 or 409. If an error occurs, the error object of the message contains an error message. In the synchronous case, this is placed in the HTTP body of the HTTP response; in the asynchronous case, it is given as the error cause to the HTTP request.
  • Optional HTTP header fields are ignored. The payload in the HTTP body is appended to the message as a binary document.
Example

HTTP address with obligatory parameters:

http://sap-ag.com:8088/sap/xi/adapter_plain?service=sender&namespace=urn%3Asap-ag%2Ecom&interface=%2Fsap%2Forders

HTTP address with obligatory and optional parameters:

http://sap-ag.com:8088/sap/xi/adapter_plain?service=sender&namespace=urn%3Asap-ag%2Ecom&interface=%2Fsap%2Forders&qos=EO&msgguid=3C61F6C12F1E2DD1E10000000A1145AB