cancel
Showing results for 
Search instead for 
Did you mean: 

Map XI System Error to Response

Former Member
0 Kudos

Hello,

I have a synchronous scenario HTTP --> XI --> RFC.

If R/3 gets timed out, I need to send timeout error in Response.

Is that possible?

I dont want to use BPM for this.

Thanks in advance,

Beena.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Beena,

any updates on this?

im looking for the same response, i want to map the error message of sap:stack in sxmb_moni to my rfc return code ...

thanks

chris

Former Member
0 Kudos

Hi Beena,

You might want use a ABAP proxy in a synchronous way to send the data to R/3 system. And I guess configure the response and send it back. Just a thought...

Regards,

Akshay

Former Member
0 Kudos

Hi Akshay,

I agree but we have 4.6B system.

So can not use proxy now.

However we are planning to use proxies after upgrade.

but still what if R/3 connection is timed out.

In this case there will be system error in XI and we need to send it back to the web application in response.

Thanks,

Beena.

Former Member
0 Kudos

Hey

Since timeout error happens in XI system(not in R/3) you won't get any response in this case.

Best option is to configure alerts for this specific scenario.

Thanx

Aamir

Former Member
0 Kudos

Thanks for your reply Aamir.

As I mentioned earlier this is synchronous scenario and HTTP application will get HTTP 500 as response code.

They need to figure out whether 500 code is due to timeout or mapping error in XI and display appropriate message.

Is there any way to distinguish this?

Thanks,

Beena.

Former Member
0 Kudos

HI,

HTTP 500 can be any problem at XI. you can categorize it ased on various Alert categories, so if there will be mapping or timeout related error along with response code 500 you will related notification.

There is no other direct way that you could differentiate based on just HTTP error code 500.

OR you can monitor it in SXMB_MONI and can identify the actual error, but I am not sure it will be the right way to do every time in Real time environment.

Thanks

swarup

bhavesh_kantilal
Active Contributor
0 Kudos

Hello Beena,

Are you sure you get a HTTP 500 back? I dont remember well and I have never had a timeout issue with synch http adapter but if I remember right, the error message is always propogated back to the HTTP Client making the call to XI with the actual description of the error.

For instance, when a Receiver Determination error occurs, u get the no case receive asynch error and so on. Isnt this same error propgated back to you? Again have never coded a HTTP client and always used the http client available on SDN for the testing that I have done.

Regards,

Bhavesh

PS : Am I missing somethin?

Former Member
0 Kudos

Hello Bhavesh,

Yes, you are right.

When you use the http client available on web, you get the error message back.

However this client uses ActiveX and same code can not be used in our application.

So we have used following code:

URL HttpUrl = new URL(URL);

HttpURLConn= (HttpURLConnection) HttpUrl.openConnection();

HttpURLConn.setDoOutput(true);

HttpURLConn.setRequestMethod("POST");

OutputStreamWriter out = new OutputStreamWriter(

HttpURLConn.getOutputStream());

out.write(request);

out.close();

BufferedReader in = new BufferedReader( new InputStreamReader(

HttpURLConn.getInputStream()));

String inputLine;

while ((inputLine = in.readLine()) != null)

response = response + inputLine;

in.close();

HttpURLConn.disconnect();

and we get following error:

java.io.IOException: Server returned HTTP response code: 500 for URL: http://sapxi:8000/sap/xi/adapter_plain?namespace=&interface=&service=Srv_Web&QOS=BE&sap-user=&sap-pa...

at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:791)

at com.reliant.b2b.adapters.net.xi.XIHttpAdapterConnection.submit(XIHttpAdapterConnection.java:112)

at com.reliant.b2b.adapters.net.xi.XIHttpAdapterConnection.submit(XIHttpAdapterConnection.java:191)

at com.reliant.b2b.adapters.data.internet.xi.HttpRequestHandler.parse(HttpRequestHandler.java:33)

at com.reliant.b2b.adapters.net.xi.HttpAdapter.getResponse(HttpAdapter.java:33)

at com.reliant.b2b.transactions.TransactionMonitor.run(TransactionMonitor.java:34)

Any Ideas??

Thanks,

Beena.

bhavesh_kantilal
Active Contributor
0 Kudos

hmm, not much of a client side coding guy

Am watching this thread to see if someone has the answer. Do provide us with a update if you are successful.

Regards,

Bhavesh

Former Member
0 Kudos

http://sapxi:8000/sap/xi/adapter_plain?namespace=&interface=&service=Srv_Web&QOS=BE&sap-user=&sap-password=&sap-client=110&sap-language=EN

I m not really sure about the HTTP client tool you are using,but in the above URL you are using port 8000 which is ABAP port.

any specific reason for doing this?

I have normally used Java port(50000) and even the URL looks a bit different.

Thanx

Aamir

Former Member
0 Kudos

Hi Aamir,

I am sendig data to integration engine.

I think that gives better performance as it goes to abap engine.

If we use 50000 port it will go to java engine.

check this blog:

Thanks,

Beena.

VijayKonam
Active Contributor
0 Kudos

Map the RFC fault message to the error part of your response type in interface mapping. You have to create separate mapping for this.

VJ

Former Member
0 Kudos

Thanks VJ.

But that will map application error.

I want to map system error in case there is timeout while making connecion from XI to R/3.

Thanks,

Beena.