wood burning stoves 2.0*
The moose likes Web Services Certification (SCDJWS/OCEJWSD) and the fly likes what is Async response bean generated by wsimport? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Certification » Web Services Certification (SCDJWS/OCEJWSD)
Bookmark "what is Async response bean generated by wsimport? " Watch "what is Async response bean generated by wsimport? " New topic
Author

what is Async response bean generated by wsimport?

Himai Minh
Ranch Hand

Joined: Jul 29, 2012
Posts: 736
I tried Martin Kalin's TimeServer example in Chapter 1:



I use this external binding to make getTimeAsString as an async method:




According to MZ's notes, wsimport will generate async response bean. But I don't see any response bean classes generated instead I see this from the generated artifact:


So, my question is what is the asyn response bean? I don't think GetTimeAsStringResponse is the asyn response bean.
Frits Walraven
Creator of Enthuware JWS+ V6
Bartender

Joined: Apr 07, 2010
Posts: 1661
    
  25

I don't think GetTimeAsStringResponse is the asyn response bean.

It actually is the response bean

From JAX-WS:
Polling method A polling method returns a typed Response<ResponseBean> that may be polled using methods inherited from Future<T> to determine when the operation has completed and to retrieve the results. See below for further details on ResponseBean.

Callback method A callback method takes an additional final parameter that is an instance of a typed AsyncHandler<ResponseBean> and returns a wildcard Future<?> that may be polled to determine when the operation has completed. The object returned from Future<?>.get() has no standard type. Client code should not attempt to cast the object to any particular type as this will result in non-portable behavior.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: what is Async response bean generated by wsimport?