aspose file tools*
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 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Certification » Web Services Certification (SCDJWS/OCEJWSD)
Bookmark "@Oneway method and exception" Watch "@Oneway method and exception" New topic
Author

@Oneway method and exception

Himai Minh
Ranch Hand

Joined: Jul 29, 2012
Posts: 610
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: 77

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, Souvik
SCJP, SCWCD, OCEJWSD
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: @Oneway method and exception
 
Similar Threads
Checke Unchecked exception
Review the WS Code
JAX-WS One way operation with return type not void
Exception handling question
How to extract the exception that caused a SOAP fault