0

I'm using a 3rd party web service that's implemented as SOAP web services.

Per their instructions I used eclipse to generate java stub classes from the WSDL.

After experiencing some long-running requests with them I dug into the generated classes, found where an org.apache.axis.client.Call was being created and invoked. I set a configurable timeout on the Call object.

I can test this by setting the timeout to something unrealistic, like 10 milliseconds. When I do this every request times out as expected.

In production, I'm seeing calls to them take longer than the timeout. As in the timeout is 3 seconds but the execution takes over a minute.

Is there something I'm missing? Maybe I need to dust off my TCP/IP Illustrated books and reacquaint myself with the finer points or maybe it's just something under the covers of the axis code.

4

1 回答 1

0

我建议您找出这个第 3 方 Web 服务实际上需要多长时间来响应客户端,而不是深入研究您的代码,因为问题可能出在服务器端。

为此,您实际上不需要自己编写客户端,而是可以使用SOAP-IU 之类的工具并尝试发送请求。如果您需要了解如何发送请求,SOAP-UI 在 Internet 上有很多详细信息。请参考这里开始。

于 2013-11-04T08:07:57.337 回答