SCJP 5, SCJD 5, SCWCD 5, SCBCD 5, SCJDWS 5
My SCBCD-Notes - OCMJEA 6 notes
Christian Nicoll wrote:This thread is a bit old, but still very valuable. I think that there miss just one scenario which put all the four possibilities together:
Regards
KumarRaja
Christian Nicoll wrote:This thread is a bit old, but still very valuable. I think that there miss just one scenario which put all the four possibilities together:
The JSR-181 specification has a change that defines the rules for when a method should be exposed as a Web method.
--- JSR-181 v0.9.2 (Dec '04)
If the implementation bean does not implement a service endpoint
interface, it must include @WebMethod annotations on each method that is
to be exposed as a Web Service operation. More information on the
@WebMethod annotation may be found in section 5.2.
--- JSR-181 v1.0 (June '05)
If the implementation bean does not implement a service endpoint
interface, all public methods other than those inherited from
java.lang.Object will be exposed as Web Service operations. This
behavior can be overridden by using the WebMethod annotation to specify
explicitly those public methods that are to be exposed. If a WebMethod
annotation is present, only the methods to which it is applied are
exposed.
William Butler Yeats: All life is a preparation for something that probably will never happen. Unless you make it happen.
Dan Drillich wrote:Apparently the JSR-181 specification went through some changes as we can see at WebService / WebMethod rules changed in latest spec -
The JSR-181 specification has a change that defines the rules for when a method should be exposed as a Web method.
--- JSR-181 v0.9.2 (Dec '04)
If the implementation bean does not implement a service endpoint
interface, it must include @WebMethod annotations on each method that is
to be exposed as a Web Service operation. More information on the
@WebMethod annotation may be found in section 5.2.
--- JSR-181 v1.0 (June '05)
If the implementation bean does not implement a service endpoint
interface, all public methods other than those inherited from
java.lang.Object will be exposed as Web Service operations. This
behavior can be overridden by using the WebMethod annotation to specify
explicitly those public methods that are to be exposed. If a WebMethod
annotation is present, only the methods to which it is applied are
exposed.
Regards,
Dan
In addition to affecting the annotated class, class-level annotations may act as a
shorthand for member-level annotations. If a member carries a specific member-
level annotation, any annotations of the same type implied by a class-level
annotation are ignored. In other words, explicit member-level annotations have
priority over member-level annotations implied by a class-level annotation. For
example, a @WebService annotation on a class implies that all the public
method in the class that it is applied on are annotated with @WebMethod if there
is no @WebMethod annotation on any of the methods. However if there is a
@WebMethod annotation on any method then the @WebService does not imply
the presence of @WebMethod on the other public methods in the class.
William Butler Yeats: All life is a preparation for something that probably will never happen. Unless you make it happen.
All of the methods on the service endpoint interface are mapped to WSDL operations,
regardless of whether they include a @WebMethod annotation.
A method MAY include a @WebMethod annotation to customize the mapping to WSDL,
but is not REQUIRED to do so.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |