aspose file tools
The moose likes Web Services and the fly likes JAX-WS One way operation with return type not void Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Web Services
Reply Bookmark "JAX-WS One way operation with return type not void" Watch "JAX-WS One way operation with return type not void" New topic
Author

JAX-WS One way operation with return type not void

Aditya Keyal
Ranch Hand

Joined: Dec 01, 2008
Posts: 71
Hi,
I am trying to test a few things in JAX-WS. I am using J2SE 1.6.0_17 for testing.

When I tried to create a SEI with a Oneway method declared with a return type, It created a wsdl: operation with only wsdl:input no wsdl: output.
I thought this behavior was in contradiction with JSR 181 and JAX-WS 2.0 Specs [Conformance (One-way mapping errors): Implementations MUST prevent mapping to one-way operations
of methods that do not meet the necessary criteria.]

Please correct me if there have been any updates which I may be unaware of. Thanks.

Code:




- Aditya Webservices Blog
Dan Drillich
Ranch Hand

Joined: Jul 09, 2001
Posts: 1123
What you see seems fine to me as the BP 1.1 says -

One-way operations do not produce SOAP responses. Therefore, the Profile prohibits sending a SOAP envelope in response to a one-way operation. This means that transmission of one-way operations can not result in processing level responses or errors. For example, a "500 Internal Server Error" HTTP response that contains a fault can not be returned in this situation.



Regards,
Dan


William Butler Yeats: All life is a preparation for something that probably will never happen. Unless you make it happen.
Aditya Keyal
Ranch Hand

Joined: Dec 01, 2008
Posts: 71
Hi Dan,

Thanks for the update. My confusion is because I thought that if a operation does not satisfy the pre-condition for a oneway operation (but has been annotated as @OneWay) it shouldnt be allowed to be deployed in the first place. But I guess they have taken a more generic approach in the implementation.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JAX-WS One way operation with return type not void
 
Similar Threads
Query regarding RPC/Document Style,WSGEN and WSIMPORT
Proper way to define a fault in a WSDL
Strange behavior with input parameter valuse during web service invocation
JAX-WS wsgen using Maven2
Question on PARAM names in WSDL file