lotus-noteslotus-dominoapache-axis

Setting a timeout on webservice consumer built with org.apache.axis.client.Call and running on Domino


I'm maintaining an antedeluvian Notes application which connects to a SAP back-end via a manually done 'Webservice'

The server is running Domino Release 7.0.4FP2 HF97.

The Webservice is not the more recently Webservice Consumer, but a large Java agent which is using Apache soap.jar (org.apache.soap). Below an example of the calling code.

private Call setupSOAPCall() {
    Call call = new Call();

SOAPHTTPConnection conn = new SOAPHTTPConnection();
call.setSOAPTransport(conn);

call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);

There has been a change in the SAP system which is now taking 8 minutes to complete (verified by SAP Team).

I'm getting an error message as follows:

[SOAPException: faultCode=SOAP-ENV:Client; msg=For input string: "906    "; targetException=java.lang.NumberFormatException: For input string: "906    "]

I found a blog article describing the error message quite closely:

https://thejavablog.wordpress.com/category/jmeter/

and I've come to the hypothesis that it is a timeout message that is returning to my Call object and that this timeout message is being incorrectly parsed, hence the NumberFormat Exception.

Looking at my logs I can see that there is a time difference of 62 seconds between my call and the response.

I recommended that the server setting in the server document, tab Internet Protocols/HTTP/Timeouts/Request timeouts be changed from 60 seconds to 600 seconds, and the http task restarted with

tell http restart

I've re-run the tests and I am getting the same error, and the time difference is still slightly more than 60 seconds, which is not what I was expecting.

I read Michael Rulnau's blog entry

http://www.mruhnau.net/2014/06/how-to-overcome-domino-webservice.html

which points to this APR

http://www-01.ibm.com/support/docview.wss?uid=swg1LO48272

but I'm not convinced that this would apply in this case, since there is no way that IBM would know that my Java agent is in fact making a Soap call.

My current hypothesis is that I have to use either the setTimeout() method on

org.apache.axis.client.Call

https://axis.apache.org/axis/java/apiDocs/org/apache/axis/client/Call.html

or on the org.apache.soap.transport.http.SOAPHTTPConnection

https://docs.oracle.com/cd/B13789_01/appdev.101/b12024/org/apache/soap/transport/http/SOAPHTTPConnection.html

and that the timeout value is an apache default, not something that is controlled by the Domino server.

I'd be grateful for any help.


Solution

  • I understand your approach, and I hope this is the correct one to solve your problem.

    Add a debug (console write would be fine) that display the default Timeout then try to increase it to 10 min.

     SOAPHTTPConnection conn = new SOAPHTTPConnection();
    System.out.println("time out is :" + conn.getTimeout());
    conn.setTimeout(600000);//10 min in ms
    System.out.println("after setting it, time out is :" + conn.getTimeout());
    call.setSOAPTransport(conn);
    

    Now keep in mind that Dommino has also a Max LotusScript/Java execution time, check this value and (at least for a try) change it: http://www.ibm.com/support/knowledgecenter/SSKTMJ_9.0.1/admin/othr_servertasksagentmanagertab_r.html (it's version 9 help but this part should be identical)