2

Is it possible to cancel a SOAP request (Axis 1.4, Java 1.6) that's currently executing?

I'm using the interfaces generated with WSDL2Java, so the call is something like myProvider.submitMyRequest(request). This is synchronous and doesn't return until a response is received. I want to be able to interrupt the call based on an external condition. Short of killing the thread that runs the request, what are my options?

4

1 回答 1

1

我一直找不到方法。我找到的最接近的解决方案是在 Stub 类上设置超时(将 myProvider 转换为 Stub)并在一个线程中运行请求,该线程可能会超时而不会阻塞系统的其余部分。

于 2010-05-17T14:40:28.727 回答