简体   繁体   中英

Calling .NET Web Services Asynchronically from Java

I need to make asynchronous calls to .NET web services from java since synchronous calls are too slow. I know in .NET this is easily done since the stub (proxy) class created by wsdl.exe also generates methods for asynchronous calls(BeginMethod()/EndMethod()). I created the service stub using eclipse Ganymede but no asynchronous method call were generated. How do you do this in java? Thanks in advance

Since you are using Eclipse, you are probably using Axis2 to generate the Web Services client. Axis2 is capable of generating an asynchronous client. Have a look at the instructions here . You need to select the "Generate async" or "Generate both sync and async" option. This is an article for asynchronous web services with Axis2. It refers mainly to the service (not the client), but the client code isn't much different.

All Java Web Services Framework support asynchronous operations. You just need to configure the generator properly.

您可以从另一个线程调用Web服务并包含回调吗?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM