How to cancel a running AXIS 1.4 SOAP request?
Is it possible to cancel a SOAP request (Axis 1.4, Java 1.6) that's currently executing?
开发者_StackOverflow社区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?
I haven't been able to find a way. The closest solution I found was to set a timeout on the Stub class (cast myProvider to Stub) and run the request in a thread that could be left to timeout without blocking the rest of the system.
精彩评论