开发者

How to cancel a running AXIS 1.4 SOAP request?

开发者 https://www.devze.com 2022-12-29 18:47 出处:网络
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 myP

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号