users@glassfish.java.net

JSR 109 and web fragments

From: <glassfish_at_javadesktop.org>
Date: Thu, 24 Jun 2010 10:53:03 PDT

I am attempting to modularize some JAX-WS deployments using the JSR 109 standard and the new Servlet 3.0 web-fragments.

Here is what I would like to do:

foo.jar/META-INF/web-fragment.xml
<web-fragment metadata-complete="true">
    <servlet>
        <servlet-name>Foo</servlet-name>
        <servlet-class>bar.Foo</servlet-class>
    </servlet>
    <servlet-mapping>
        <servlet-name>Foo</servlet-name>
        <url-pattern>/Foo</url-pattern>
    </servlet-mapping>
</web-fragment>

foo.jar/META-INF/webservices.xml
<webservices xmlns="http://java.sun.com/xml/ns/javaee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/javaee_web_services_1_3.xsd" version="1.3">
    <webservice-description>
        <webservice-description-name>FooService</webservice-description-name>
        <wsdl-file>META-INF/wsdl/foo.wsdl</wsdl-file>
        <port-component xmlns:foo="http://foo.com">
            <port-component-name>FooPort</port-component-name>
            <wsdl-service>foo:FooService</wsdl-service>
            <service-impl-bean>
                <servlet-link>Foo</servlet-link>
            </service-impl-bean>
        </port-component>
    </webservice-description>
</webservices>

foo.jar/bar/Foo.class

war/WEB-INF/web.xml:
<web-app metadata-complete="false" .../>

war/WEB-INF/lib/foo.jar

Would this be supported or must the JSR 109 webservices.xml file only be declared at the WAR level in WEB-INF when servlet-links are used? This seems to be the case based on my initial testing. I could potentially make the foo.jar an EJB module which JSR 109 supports but I would prefer to use the JavaEE 6 web profile.
[Message sent by forum member 'aaronanderson']

http://forums.java.net/jive/thread.jspa?messageID=475715