cancel
Showing results for 
Search instead for 
Did you mean: 

SocketTimeout Exception while calling a Web Service from EJB

Former Member
0 Kudos

Hi All,

I am consuming a Web Service defined from the WSDL received from a PI system

in a Stateless EJB.

The input of the Service can be a range of records 100 - 10,000, with a furture plan to exceed the range as 100 - 15,000.

The Web Service Call goes perfect with 100 - 3500 number of records.

As the number of records exceed 3500, we started getting the following exception:

Service call exception; nested exception is: java.net.SocketTimeoutException: Read timed out

Along with a call happenning to the PI system after some seconds.

Referring to various help.sap.com pages, I came across the following code snippet:

client._setProperty("socketTimeOut","200000");

This thing works great!!!, and now we have set the the socketTimeout proggramatically to a satisfactory level which supports the current requirement.

I would like to know, if we can tune some Visual Administrator Parameter for this, instead of maintaining the "Socket TimeOut" in the code.

Any help will be appreciated.

Best Regards,

Alka.

Edited by: Alka Panday on Apr 23, 2008 9:17 AM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Alka,

Please refer to SAP Note 962114. This is specifically for Web Service clients.

Description-->

This note can be applied for 6.40 SP 12+. If the customer has a lower SP, an upgrade of the whole engine is recommended. The other alternative to set the timeout is to set it programmatically.

If running a 7.0 installation, the functionality has been integrated in SP8 onwards

When you go to the Visual Administrator -> Server -> Services -> Web Services Container on the Settings tab page you should be able to see the socket timeout input field next to the HTTP Proxy settings. You can change the default value there and it will be automatically applied to all WS client proxies and logical ports deployed on the system.

Hope this helps.

regards,

Piyush

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Piyush,

I was not able to find the note number 962114 that you have mentioned.

As mentioned, I have got the setting for Web Service Clients Timeout. I'll test it out and conclude this question.

Regards,

Alka.

Former Member
0 Kudos

Thanx Piyush .. it worked.

Regards,

Alka.