cancel
Showing results for 
Search instead for 
Did you mean: 

Timeout during Webservice-call

Former Member
0 Kudos

Hello,

I'm getting a ServiceCallException when calling a webservice method from web dynpro with the response taking more time than 60 seconds. In the log files I can see that the webservice method finished successfully but web dynpro cuts off exactly after 60 seconds.

Maybe it is possible to set e.g. a property to configure the request timeout in web dynpro. Can anyone help?

Kind regards,

Bjoern

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

This is only part of the answer, at least if you are using web services from within Web Dynpro (the rule rather than the rare case I suppose).

The point is on exactly which object one has to set the property. Have a look at the execute method of your model object. You will find a logical port created as a temporary object in a way Maksim has described.

I could think of only two (poor) alternatives:

- modify the generated code and risk your changes being lost when the code is re-generated

- copy the generated code and fit it to your needs, i.e. insert a call to _setProperty

Fortunately, we have only one web service that needs to be twisted, so I chose the latter. Ah yes, and it works - finally.

Martin Saschek

Answers (1)

Answers (1)

Former Member
0 Kudos

It is really important to solve this. I can't believe that noone has been facing this problem yet.

Regards,

Bjoern

former_member182372
Active Contributor
0 Kudos

Hi Bjoern,

Try this:


<MODEL>.getServiceImpl().getLogicalPort("<NAME_OFLOGICAL_PORT>" , <PORT_TYPE_CLASS>.class)._setProperty("socketTimeout", "180000");//in mseconds

for example:

    try {
		com.sap.sdn.wsmodel.proxies.SendEmailServiceImpl service = com.sap.sdn.wsmodel.Emailmodel.getServiceImpl();
		com.sap.sdn.wsmodel.proxies.SendEmailPortType logicalPort = (com.sap.sdn.wsmodel.proxies.SendEmailPortType) service.getLogicalPort("SendEmailPort" , com.sap.sdn.wsmodel.proxies.SendEmailPortType.class );
		logicalPort._setProperty("socketTimeout", "180000");//in mseconds
    } catch (Exception e) {}

Best regards, Maksim Rashchynski.