如何在 Java 中调用异步 Web 服务
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3987600/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to call Async Web service in Java
提问by cracked_all
I thought there would be lot more info/tutorials on this one, but some how I'm not able to figure out how to call an async SOAP web service using Java. The web service in question may not necessarily be a Java web service. I only have access to web service's run time WSDL. Any pointers will be greatly helpful.
我以为会有更多关于这个的信息/教程,但有些我无法弄清楚如何使用 Java 调用异步 SOAP Web 服务。有问题的 Web 服务不一定是 Java Web 服务。我只能访问 Web 服务的运行时 WSDL。任何指针都会有很大帮助。
Also would it be possible to dynamically call such a web service? The Dynamic Invocation Interface method javax.xml.rpc.Call
allows that for sync calls, but haven't found anything on async calls.
还有可能动态调用这样的网络服务吗?动态调用接口方法javax.xml.rpc.Call
允许同步调用,但在异步调用上没有找到任何东西。
采纳答案by bmargulies
See the JAX-WS standard for the use of Future objects to communicate, asynchronously, with services. For some examples see CXF documentation on JAX-WS clients.
请参阅 JAX-WS 标准以使用 Future 对象与服务进行异步通信。有关某些示例,请参阅JAX-WS 客户端上的 CXF 文档。