Skip to main content

@WebService annotation in a library jar

1 reply [Last post]
gang_yang
Offline
Joined: 2009-06-11
Points: 0

Hi,

I encountered something interesting and wondered what the forum thinks - is a bug or a feature. We had a jar that contained a class A that was annotated with @WebService. This class A is a WebService implementation class under a different depplyment. However, in this deployment of new Web Service endpoint, this class A in the jar is simply used as a library and web.xml did not point to this class A either. But when I deployed this new WebService (packaged in a war) to Glassfish v2.1, Glassfish was trying to process the @WebService annotation in this class A in the library jar and of course caused error. The same jar is also used in another new EJB3-based WebService endpoint and packaged as EJB jar. That deployment did not cause any problem. So is this a bug in Glassfish's Web container (EJB did not show the same behavior)?

Thanks,
Gang

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Jitendra Kotamraju

metro@javadesktop.org wrote:
> Hi,
>
> I encountered something interesting and wondered what the forum thinks - is a bug or a feature. We had a jar that contained a class A that was annotated with @WebService. This class A is a WebService implementation class under a different depplyment. However, in this deployment of new Web Service endpoint, this class A in the jar is simply used as a library and web.xml did not point to this class A either. But when I deployed this new WebService (packaged in a war) to Glassfish v2.1, Glassfish was trying to process the @WebService annotation in this class A in the library jar and
Yes, that's the correct behaviour. You can control using webservices.xml
and metadata-complete=true in web.xml
> of course caused error. The same jar is also used in another new EJB3-based WebService endpoint and packaged as EJB jar. That deployment did not cause any problem. So is this a bug in Glassfish's Web container (EJB did not show the same behavior)?
>
This I need to check. Pehaps, since the class has only @WebService and
doesn't have @Stateless, it might not be considering as a webservice.

Jitu
> Thanks,
> Gang
> [Message sent by forum member 'gang_yang' (gang_yang)]
>
> http://forums.java.net/jive/thread.jspa?messageID=358803
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@metro.dev.java.net
> For additional commands, e-mail: users-help@metro.dev.java.net
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@metro.dev.java.net
For additional commands, e-mail: users-help@metro.dev.java.net