cancel
Showing results for 
Search instead for 
Did you mean: 

RFC->SAP XI->PLAINHTTP SYNC causing Problem

Former Member
0 Kudos

Hi,

I am trying to set up a Scenario that sends a synchronous

Request from SAP via RFC to a selfwritten HTTP Receiver,

using the Plain HTTP Adapter. I want to receive my request

by my server (that part works allready)and send my response through the same connection back.

Everytime I send something back I get an

<SAP:Code area="PLAINHTTP_ADAPTER">ATTRIBUTE_CLIENT</SAP:Code>

<SAP:P1>402</SAP:P1>

<SAP:P2>ICM_HTTP_TIMEOUT

My response looks like this (and references the request message ID)

POST /?msgguid=AF49CDF02A7911DAA426000854D162F4&service=

BS_HttpTestService&namespace=http%3a%2f%2fhchgmbh%2ede%2fxi%2fTestRFC2HTTPScenario_1&interface=MI_TESTHTTPMESSAGE HTTP/1.0

content-type: text/xml

content-length: 256

connection: close

accept: /

user-agent: BS_HttpTestService

host: 192.168.1.225:44831

accept-encoding: gzip

<?xml version="1.0" encoding="UTF-8"?>

<ns:MT_TESTHTTPMESSAGE_RESPONSExmlns:ns="http://hchgmbh.de/xi/TestRFC2HTTPScenario_1">

<HAUPTKNOTENRES><RFELD1>Anton</RFELD1><RFELD2>Myer</RFELD2><RFELD3>rules</RFELD3></HAUPTKNOTENRES></ns:MT_TESTHTTPMESSAGE_RESPONSE>

1. Is that scenario working that way?

2. If not, what do I have to response(message format)?

Please help, I am new to that HTTP Stuff...

Kind regards

Daniel

Accepted Solutions (1)

Accepted Solutions (1)

udo_martens
Active Contributor
0 Kudos

Hi Daniel,

ur selfwritten HTTP Receiver is not sending a Response (of a synchronous process) than an extra message. Because of that XI is waiting til "Timeout".

Regards,

Udo

Former Member
0 Kudos

hi,

Try increasing the ICm timeout value.

1. goto smicm -> goto -> paramerters -> change

look for icm/conn_timeout and increase its value

2. visual admin -> server -> services -> httpprovider ->

check property ServeletInputStreamTimeout, typically it is 6000.

Naveen

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Robin and all,

maybe I need to make that more clear,

I build a complete synchronous scenario in ID,

RFC -> XI -> PLAINHTTP everythings works fine until my

Java program catches the response message,

when I try to use the still open connection (through

that Xi has allready sended my the request) to put the

XML-Message (Response message type referenced at the

response tab of my synchronous interface)back, I get a

time out in XI.

1. Question: Can I use the socket object in my Java

progtam to send my response directly back

2. If yes what besides the XML message payload is needed

3. Will I have to reference the incoming Message ID to

make clear my message is the synchronous response?

Thanks for helping me with that.. (answer will be rewarded)

Daniel

with a synchronous Interface on inbound (HTTP) side and

I catch

the sendes request message from HTTP Plain Adapter in my

Java Program (socket server object),

I keep the connection open and I through the same

connection the Response Payload (which is

the XML representation from my Response - Message Type

as defined in XI), looks like this:

Former Member
0 Kudos

Hi,

O.k., got that.. but then...

My self-written Java-Program is basicly a socket server,

that keeps the connection the PLainHTTP Inbound Adapter opens and writes via an Outputstream of the socket object, my response message plus some header information like Sendersystem, Senderinterface and so on back (in the same syntax as the request message is)

1.What expects XI to handle my response as the synchronous answer of communication?

2. How can I synchronously communicate then?

3. How would the message format be?

Former Member
0 Kudos

Hi,

1. In XI you need a Syncronus Interface to set a Response Message.

2. You sends your Request with the HTTP Adapter. You must create a Communication Channel.

3. XML format, you create the Response type in your Interface.

Regards,

Robin