开发者

client-side synchronous service invocation

开发者 https://www.devze.com 2022-12-24 08:44 出处:网络
I am talking about synchronous on the client side. That means, the service requester is blocking after sending a message to the service.

I am talking about synchronous on the client side. That means, the service requester is blocking after sending a message to the service.

my question is: is it related to the -a -s parameter of wsdl2java tool, Since -a generate async style code and -s gen开发者_如何学Cerate sync style code.

Or the client side blocking or not is totally controlled by the client logic?

Thanks


-a Generate async style code only (Default: off)
-s Generate sync style code only (Default: off). Takes precedence over -a

These options will define how your client will behave for request/response, when you use WSDL2Java most of the times you generally write the business logic to make the appropriate operation calls with appropriate parameters.

You can still over ride the client invocation style, but its really not going to be easy to read that auto generated code of AXIS 2. :)


You use the wsdl2java tool to generate either a synchronous (blocking) or an asynchronous (non-blocking) client stub.

For more details I'd recommend reading the low level APIs documentation. This would describe the operation of the code you'll find in your generated java files.


If you're using netbeans to generate your web service client, the operation generated is already synchronous by default. If you want to toggle it to be asynchronous call or vice versa, you can follow these steps easily : https://netbeans.org/kb/docs/websvc/client.html#asynch-creatingtheclient

0

精彩评论

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