On 4/12/07, Jerome Louvel <jerome.louvel_at_noelios.com> wrote:
>
>
> Dhanji, Paul,
>
> > > I dont think this is wise as @WebMethod is a jws
> > annotation used to
> > > expose EJB methods via WSDL-style webservices.
> >
> > Foiled again! Darn, this naming thing is tricky!
> >
> > You would think that packages solve this problem. =)
>
> Hmm, if you rely on this JSR API to expose your EJBs as Web Services, why
> also rely on JWS at the same time?
the JSR-220 spec refers to this JWS api to expose web services in accordance
with JAX-RPC (JSR-220 also requires exposing via soap from this annotation).
Of course you can use these annotations outside of session beans.
In the rare cases where both RESTful and
> SOAP Web Services should be exposed from the same POJOs, then package
> names
> should solve the issue. Otherwise, there is little interest in having
> namespaces.
This is a compelling argument. I would agree were it not for the fact that
in practice it does introduce unnecessary confusion and ambivalence (at the
*very* least IDE auto-completion can get messy). I also feel that
@WebResource is too general a name (@WebMethod might be a bit better, but
why not avoid it altogether and use a clear unique set?).