This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Web Services Certification (SCDJWS/OCEJWSD) and the fly likes @Oneway method and exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Web Services Certification (SCDJWS/OCEJWSD)
Bookmark "@Oneway method and exception" Watch "@Oneway method and exception" New topic

@Oneway method and exception

Himai Minh
Ranch Hand

Joined: Jul 29, 2012
Posts: 1124
Suppose, I have this:

According to MZ's notes, this sayHello is a one way method and JAX-WS won't generate any soap fault and JAX-WS may not throw any checked exception . That is understandable. So, if there is an exception, there will be no SOAP fault responded to the client.
However, the server will throw the exception on the server side. Why the correct answer is JAX-WS may not throw an checked exception?
I think the correct answer is JAX-WS may throw any unchecked exception.
Souvik Dasgupta
Ranch Hand

Joined: Sep 24, 2009
Posts: 95

MZ's note also says the following:

A JSR-181 processor is REQUIRED to report an error if an operation marked @Oneway has a return value, declares any checked exceptions or has any INOUT or OUT parameters.

Thanks and Regards
I agree. Here's the link:
subject: @Oneway method and exception
jQuery in Action, 3rd edition