cancel
Showing results for 
Search instead for 
Did you mean: 

About HTTP sync scenario

Former Member
0 Kudos

Hi all

It could be a silly question but as we do not use sender agreement in HTTP sender then how do the external system who wants to communicate synch. with XI-PI system know which interface to use .

and how can we tell XI that this specific http request has to go to RFC or PROXY for exmaple.

best regards.

Accepted Solutions (1)

Accepted Solutions (1)

former_member189441
Active Participant
0 Kudos

Hi,

Incase of HTTP adapter ..

The message is sent using HTTP directly to XI integration engine . That is the reason no adapter is required.

Just to give you an example..

File Adapter reads the file and then sends it to Integration Engine. So if you send the file directly to IE you wont need a adapter..Right?

since HTTP client connects to the integration server directly and the HTTP request should contain all relevant information about sender.

Hope this is helpful.

reward points if it is useful

thanks

murali

Edited by: murali krishna on Mar 13, 2008 11:10 AM

Former Member
0 Kudos

Hi

But lad os say that a java application wants to send a http request and get the answer , how can they know wich interface to use.

regrads.

Former Member
0 Kudos

The plain HTTP adapter enables you to receive and send business data from and to external systems, using the plain HTTP inbound/outbound channels of the Integration Engine.

The standard exchange format for data in the Integration Engine is XML. However, using the plain HTTP adapter you can also send and receive data in HTML and ASCII. In this case you must use a Java mapping.

Prerequisites

The HTTP service /sap/xi/adapter_plain supplied by SAP must be assigned to the client in which you run the Integration Engine.

Process Flow

An HTTP client sends business documents to the Integration Engine using HTTP. A message is generated from the business document and transferred to the Integration Engine. If, on the other hand, the Integration Engine identifies a plain HTTP receiver, a business document is generated from the message and sent to the receiver. This communication is either synchronous (the client awaits a response to its HTTP request) or asynchronous.

Integration Engine: HTTP Inbound Channel

The Integration Engine is called by external systems using HTTP and an HTTP address. For this purpose, the HTTP inbound channel of the Integration Engine contains the HTTP service /sap/xi/adapter_plain, delivered by SAP.

The class CL_HTTP_PLAIN_INBOUND is provided as a request handler that processes an HTTP request synchronously (client awaits a response) or asynchronously.

Multi-part documents and HTTP requests with an empty HTTP body are not accepted and receive a response with status code 500 or 204.

The obligatory parameters of the HTTP address are analyzed and used to construct the message.

Mandatory Parameters

Parameter

Meaning

service

Sender service for identifying the sender

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

namespace

Namespace of the sender interface

interface

Interface of the HTTP payload

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

You must code special characters such as forward slash (/), hyphen , period (.), or colon ( with escape characters (for example, %2F for /, %2D for -, %2E for .,and %3A for :).

The optional parameters of the HTTP address are also analyzed. They affect the runtime response of the message in the Integration Engine.

Optional Parameters

Parameter

Meaning

party

Sender party (XI 3.0 only)

agency

Issuing agency of the sender (XI 3.0 only)

scheme

Identification scheme of the sender (XI 3.0 only)

qos

Quality of service of the message:

Synchronous (BE) or asynchronous (EO, EOIO) processing; the default setting is synchronous processing.

queueid

Queue name in EOIO processing (XI 3.0 only)

msgguid

32 character message ID; uniquely identifies a message in the Integration Engine. If no message ID is specified, the system generates one internally.

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

You must code special characters such as forward slash (/), hyphen , period (.), or colon ( with escape characters (for example, %2F for /, %2D for -, %2E for .,and %3A for :).

Optional HTTP header fields are ignored. The payload in the HTTP body is appended to the message as a binary document. The payload must be sent as an XML document with code page UTF-8, so that all services of the Exchange Infrastructure can process the document.

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.

HTTP Outbound Channel of the Integration Engine (Receiver HTTP Adapter)

The Integration Engine calls the plain HTTP adapter if technical routing identifies a communication channel for the logical receiver. This communication channel originates from the Integration Directory. It is analyzed and provides the technical information for the HTTP request.

The main payload of the message is sent as HTTP post to an HTTP address. The technical data for the HTTP post is determined from the communication channel parameters.

A HTTP client is instantiated for a logical destination, in which the following data are maintained:

· HTTP address

· HTTP proxy data

· Authentication settings

· Security data

If no destination is specified, the system instantiates an HTTP client using the specified HTTP address and the proxy data. A basic authentication is entered in the HTTP header fields with a user and password in BASE64 code.

The optional header fields maintained in the communication channel parameters are set in the HTTP header.

The header fields Content Type (if not already explicitly set), Content Length, and the host are set by default.

In the HTTP address, the sender party is set as the parameters party, agency, and scheme, the sender service is set as the parameter service, and the interface used is set as the parameters namespace and interface. Depending on the current quality of service (qos) of the message, the parameter qos is also added to the HTTP address. If the quality of service is EOIO, a queue name is also required in the parameter queueid.

The HTTP body comprises the prolog, message payload, and epilog. The prolog and epilog are optional and enhance the payload for particular servers (for example, CGI servers). If the payload is to be sent as an HTML form using HTTP post, it is URL-escaped beforehand.

If the specified code page for the HTTP body does not correspond to the default setting UTF 8, the system converts the HTTP body to the corresponding code page; in the XML document, the system replaces the tag encoding=UTF-8 with the corresponding code page tag.

If the quality of service is set to Best Effort, the system awaits a response from the HTTP server. The system appends this response to the message as a new main payload (with the content type, if necessary), while it deletes the old main payload.

The system logs any errors that occur in the message.

Former Member
0 Kudos

Hi

Thanks for the good and logical explanations.

I have now set up the http-proxy scenario but when I tes it with the HTTP test client I get always this ERROR

:51080/sap/xi/adapter_plain terminated due to error in logon data.</p></td></tr><tr><td>&nbsp;</td></tr><tr><td class="emphasize"><strong>Note</strong><br><ul><li> Logon performed in system ERP . </li><li> Logon performed for client 001, user xiappluser , and language EN and so on.

I understand the error but I don not understand why it comes , the strange thing is that I can easilly log on with sap gui for this user, and no matter which user I use with the http test client it refere always to the mentioned ERROR.

I am really confused

any help is appreciated

Thanks.

Former Member
0 Kudos

Hi

I managed to solve the problem.

I realised that there is a hard code in the http test client ith another pass word

Thanks.

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Malu,

in a HTTP sych scenario, when an external system sends a HTTP req to XI, then it has the sender interface information..... so when that msg comes to XI, then XI knows which scenario it needs to invoke depending on the receiver determination done in ID for that sender outbound interface............then XI knows what it needs to do with that source HTTP req - whether a RFC or a proxy needs to be invoked in SAP system depending on the receiver agreement.............similarly when XI gets the response of this request msg from SAP then it sends it via a HTTP response msg to the external system.

Regards,

Rajeev Gupta

Former Member
0 Kudos

Hi All

Thanks for your help , I am convinced now how to do it, in this connection I have another simple question.

when we invoke the indbound proxy then the methode say SYN_INB~EXECUTE_SYNCHRONOUS. is called automatically right , then inside it we have our logic

my qeustion is ,is there any way we can control the call of this methode inside another programs.

for instanse if I have a programt ztest , then inside ztest I want to implement the indbound proxy in the same way as we control the outbound proxy by calling the outbound methode.

I hope I managed to explain the issue.

Thanks

Former Member
0 Kudos

Hi Malu,

i do not think there is any use of controlling an inbound proxy in this way.............see a inbound proxy is invoked on coming of a req message, so in its response you have to do something..................but an outbound proxy is a request msg so you can control it as when you want to generate the req msg..........you cannot control an inbound proxy in this way as it is always listening to a request msg and it will respond on coming of a req msg.

Regards,

Rajeev Gupta

Edited by: RAJEEV GUPTA on Mar 13, 2008 2:44 PM

stefan_grube
Active Contributor
0 Kudos

You put the interface name and namespace in the URL parameters.

See here:

http://help.sap.com/saphelp_nw04/helpdata/en/82/f4993c03e0cd37e10000000a11405a/frameset.htm

Regards

STefan

Former Member
0 Kudos

Hi,

When the data is sent formt he HTTP it will have the message Interface name where the data has to go for which you would have created the Reciever determination.

Once it comes here you will have the corresponding Interface determination and receiver agreement for passing the data

Regards

Vijaya