File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services Certification (SCDJWS/OCEJWSD) and the fly likes Endpoint class and @WebMethod Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Services Certification (SCDJWS/OCEJWSD)
Bookmark "Endpoint class and @WebMethod" Watch "Endpoint class and @WebMethod" New topic
Author

Endpoint class and @WebMethod

Himai Minh
Ranch Hand

Joined: Jul 29, 2012
Posts: 741
In Ivan's notes, p. 150, it says about service endpoint class (annotated with @WebService) "Web service methods must be annotated with @WebMethod , except in the case when all elements of the @WebMethod annotation have the default values."

But in MZ's version 5 notes chapter 4, it says if we have this and SIB with this @WebService (endpointInterface="xxx"), the class must not have @WebMethod.
Secondly, if an SIB does not reference to any SEI and no @WebMethod is specified, all public methods and inherited methods are exposed excluding those methods inherited from Object.


Do the statement in Ivan's note contradict with those in MZ's notes?
"Web service method must be annotated with @WebMethod" ? But if an SIB does not have any @WebMethod methods, that means all public methods are web service methods.
Himai Minh
Ranch Hand

Joined: Jul 29, 2012
Posts: 741
To answer my own questions, I read MZ's version 6 notes p.17 about exposed methods.
According to MZ, the new interpretation after JAX-WS 2.1.6, if there is a SIB with implicit SEI, all public methods and inherited methods are exposed as web service methods regardless they are annotated with @WebMethod or not.
But before JAX-WS 2.1.6, the legacy interpretation in the same SIB, only those with @WebMethod are exposed as web method.

So, in Ivan's notes, he is refering to the legacy one.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Endpoint class and @WebMethod