[jboss-user] [JBoss Web Services] New message: "Re: How can I force a particular WS implementation? How to ensure Metro over Native?"

Alessio Soldano do-not-reply at jboss.com
Thu Mar 11 06:08:12 EST 2010

User development,

A new message was posted in the thread "How can I force a particular WS implementation? How to ensure Metro over Native?":


Author  : Alessio Soldano
Profile : http://community.jboss.org/people/alessio.soldano@jboss.com

What you example is doing is basically leveraging classloading isolation in the war; the Sun libraries you include in the web application take over to the corresponding ones installed in the server (the jaxws impl, etc.)
The application server "knows to use Metro" in that case just because of the web.xml you're providing:
> <listener>
>         <listener-class>com.sun.xml.ws.transport.http.servlet.WSServletContextListener</listener-class>
> </listener>
> <servlet>
>         <servlet-name>MyWebService</servlet-name>
>         <servlet-class>com.sun.xml.ws.transport.http.servlet.WSServlet</servlet-class>
> </servlet>
> <servlet-mapping>
>         <servlet-name>MyWebService</servlet-name>
>         <url-pattern>/FooService</url-pattern>
> </servlet-mapping>
As you can see there's no reference to a jaxws annotated class here above; on the countrary, you're refferring to the Metro's servlet and specifying it's servlet context listener. At that point, the Metro specific descriptor (sun-jaxws.xml) enter the game and the rest of the setup is up to the Sun libs.
In the case above, the web app is like another other web app to JBoss.
The problem with your solution is in the fact you need to bundle a stack implementation with your own application.
When you install JBossWS-Metro (the same could be said about JBossWS-CXF, of course) to the application server, instead, you get a proper integration to the AS. For example, besides slimming down the size of you app archive, you no longer need to provide the proprietary sun-jaxws descriptor in your deployment (it's automatically generated by JBossWS-Metro), you get access to the common JBossWS features (centralized endpoint registry, for instance). Also, I did not try your sample (need to mangle with my maven repository setup ;-) to make it build), but can you use EJB3 endpoints with your solution? what about webservice context injection in ejb3 endpoints? what about webservicerefs?
I'm not saying what you did is wrong, it's a nice way of having a single app running on Metro on a JBWS-Native configured application server. Unfortunately it's going to suffer from some issues, that's all ;-)


To reply to this message visit the message page: http://community.jboss.org/message/531343#531343

More information about the jboss-user mailing list