cancel
Showing results for 
Search instead for 
Did you mean: 

Timeout in asynchronous File to SOAP scenario

former_member203665
Participant
0 Kudos

Dear Experts,

I have an outbound ASYNCHRONOUS scenario from SAP (File) to External system (SOAP).

The source file size is large and it takes more then 6 minutes to get it uploaded in the target, which will eventually increase as the file size is expected to be more.

The issue is since that since it is taking long time to send the payload, the channel ends up with  HTTP 403 Forbidden error, which we expect is because of Timeout.

Because of the error in channel, it tries resend the message three more times and sets it as failed.

Below are the logs for more detail:

  • 12.09.2016 16:56:31.070 Error Exception caught by adapter framework: java.io.IOException: HTTP Error response for SOAP request or invalid content-type.; HTTP 403 Forbidden
  • 12.09.2016 16:56:31.071 Error Delivery of the message to the application using connection SOAP_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.io.IOException: HTTP Error response for SOAP request or invalid content-type.; HTTP 403 Forbidden
  • 12.09.2016 16:56:31.073 Error Message status set to NDLV

I have put Timeout parameter in the receiver SOAP channel but it is not working, not sure if the module is applicable for Asynchronous Scenario.

We replicated the scenario via SOAP UI also and gives a timeout.

  • Tue Sep 13 17:38:40 CEST 2016:ERROR:Exception in request: java.net.SocketTimeoutException: Read timed out

When I explicitly increase SOAP UI Timeout to 10 minutes it works fine.

Could you please suggest how can we increase the Timeout in an asynchronous SOAP scenario?

Kindly help.

BR,

Shashank

Accepted Solutions (0)

Answers (4)

Answers (4)

former_member203665
Participant
0 Kudos

Dear Experts,

The Module parameter - XMBWS value seems to be getting suppressed  from some system level time out setting.

Could you please help me in finding where the timeout parameters are set at Adapter Engine level for a SOAP channel?

BR,

Shashank

former_member182412
Active Contributor
0 Kudos

Hi Shashank,

Check the below sap note.

1621719 - Timeout parameters in SOAP Sender/Receiver Adapter


The Parameter Name value depends on the Module Name used in the SOAP channel (the Module Name has changed with newer PI releases)

- From 7.30+ onwards, XISOAPAdapterBean is replaced by CallSapAdapter in the Sender side

- If the channel is upgraded from 7.11 to 7.30+, and if it still uses XISOAPAdapter Bean, XI.Timeout will be supported to ensure the backward compatability

- if Module Name = XISOAPAdapterBean - use XI.Timeout

- if Module Name = CallSapAdapter - use syncTimeout

Regards,

Praveen.

former_member203665
Participant
0 Kudos

Hi Praveen,

I have referred the Note and as I have used XMBWS parameter in my SOAP Receiver adapter, but seems like the timeout I have mentioned in the channel module is getting suppressed by system level timeout setting.

Regarding the module name change, i believe that the below mentioned parameters are applicable only for Sender channel where as my scenario is Async. with SOAP as receiver adapter:

- if Module Name = XISOAPAdapterBean - use XI.Timeout

- if Module Name = CallSapAdapter - use syncTimeout


Regards,

Shashank

former_member190293
Active Contributor
0 Kudos

Hi Shashank!

As far as I know, HTTP error "403 Forbidden" means that server denies access for requested resource. So I would suggest to check if your request from PI to WS is correct.

Also when you tried to query web service from SOAP UI you didn't get 403/Forbidden but timeout error.

Do you get error in PI in several minutes interval after sending request or right after sending? If second, it's definitely not the timeout issue on this step.

Regards, Evgeniy.

former_member203665
Participant
0 Kudos

Hi Evgeniy,

The interface works fine with small payload, also with large payload I see that all the records are getting uploaded & processed correctly in the target system but as the size of message is large & target system sends HTTP 200 OK only once complete upload is done, in the PI SOAP channel the default timeout occurs.PI treats it as recoverable error, it tries it to resend it three more times and than sets it as failed which leads to error logs in the channel.

So I want to avoid these channel error logs & I assume that can be done if I increasing the timeout of the receiver SOAP channel.

I have tried XI.Timeout and XMBWS module parameters but seems like they do not work in Asynchronous scenario.


Regards,

Shashank

former_member190293
Active Contributor
0 Kudos

Hi Shashank!

Just for case: did you set QuOS to "Exactly once"?

Regards, Evgeniy.

former_member203665
Participant
0 Kudos

Hi Evgeniy,

Yes, the whole interface (File to SOAP) is designed to be asynchronous with QoS as Exactly Once.

BR,

Shashank

manoj_khavatkopp
Active Contributor
0 Kudos

Shashank,

Why do you get timeout issue for async?  My guess SOAP adapter is waiting for the HTTP 200 response code from webservice.

try with Parameter XI.Timeout = milliseconds in module parameter.

When I explicitly increase SOAP UI Timeout to 10 minutes it works fine.

What response do you get after increasing the timeout in SOAPUI , check the raw tab of response in SOAP UI.

br,

Manoj

former_member203665
Participant
0 Kudos

Hi Manoj,

I used XI.Timeout parameter also but the error is still the same HTTP 403 Forbidden.

The scenario is designed to be asynchronous and we are not interested in the response message from the target system.

As you mentioned the SOAP adapter by default waits for the HTTP 200 response code from webservice and hence it timeouts if response is not received.

manoj_khavatkopp
Active Contributor
0 Kudos

When tested with SOAP UI do you get http 200 after increasing timeout parameter ?

if not then i am afraid that you need to ask the webservice to send so , as default soap adapter behaviour is to wait for http 200 response code.

Br,

Manoj

former_member203665
Participant
0 Kudos

Hi Manoj,

Yes we do get response as HTTP 200 OK via SOAP UI, the issue here is the response is sent from receiver system only after the complete upload and since the payload size is more hence SOAP channel by default timeouts.

I have tried XI.Timeout and XMBWS module parameters but they did not work.


Is there anyway we can increase the time out of a receiver SOAP channel in an Asynchronous Scenario?

BR,

Shashank

manoj_khavatkopp
Active Contributor
0 Kudos

AFAIK , i think these are the only parameters.

If payload size is big why dont u split into certain records using multimapping ? or ask the source system to send data in chunk

former_member186851
Active Contributor
0 Kudos

Hello Shashank.

You can try ignoring this response using a module.

@Manoj am I correct here?

manoj_khavatkopp
Active Contributor
0 Kudos

Raghu,

The issue here is the SOAP adapter is not receiving the response Code Http 200 , so their is no question to ignore the response.

As Evgeniy Kolmakov suggested  this may be due the wrong request or Content type sending from PI end.

Shashank you can check the actual payload leaving from Pi using http trace :

Cross chekc this request with the request sending from SOAP UI (use Raw tab of the Request in soap UI) and also additionally to the payload check even the even the headers too.

br,

Manoj

former_member203665
Participant
0 Kudos

Hello Manoj,

The payload leaving from PI is correct as when from the same file if I send less records, the interface works fine.

Also with large payload I see that all the records are getting uploaded & processed correctly in the target system but as the size of message is large & target system sends HTTP 200 OK only once complete upload is done and I assume that in the PI SOAP channel the default timeout occurs by that time.

Raghu, as Manoj mentioned that since SOAP adapter is not receiving the response Code Http 200 within the default time, so their is no point in using a module to ignore the response.

Regards,

Shashank

former_member186851
Active Contributor
0 Kudos

No Shashank,If you ignore it you wont get this error in SAP PI.

anyways can you try with small payload and check if the WS is updated.

manoj_khavatkopp
Active Contributor
0 Kudos

Shashank,

The i would suggest if any of timeout parameters are not working then you can split the message into smaller size using multimapping.

Because lets say you set the timeout parameter and later in production you get message of bigger size and then again your web-service takes time (more then the timeout mentioned) to process data and sent http code back which results again in error.

Br,

Manoj

former_member186851
Active Contributor
0 Kudos
former_member203665
Participant
0 Kudos

Hi Raghu,

Thanks for quick response but as i mentioned above I have already tried that option and seems like it does not work for an Asynchronous scenario.

I have referred to Note 856597, 893713.

I have checked on scn and found some related discussions but none is answered:

Asynchronous web service without response | SCN

Does XMBWS works for Asynchronous scenarios?

BR,

Shashank