users@glassfish.java.net

Re: web.xml for web service deployment

From: Vijay Ramachandran <Vijay.Ramachandran_at_Sun.COM>
Date: Fri, 10 Mar 2006 07:58:50 -0800

On Fri, 2006-03-10 at 04:47, Mark Hansen wrote:
> I notice that Glassfish allows you to use a web.xml to deploy a web
> service - as in the example below taken from the sample
> devtests/webservice/annotations/warservice.
>
> In the structure of this web.xml, the servlet-class references the
> Service Implementation Bean.
>
> Is this type of web.xml defined as a standard in one of the JSRs, or is
> the a Glassfish-specific deployment method?

You specify your servlet class in the servlet-class element of web.xml.
This is standard.

During deployment, GlassFish recognizes this as a webservice with
servlet endpoint - changes servlet-class element to point to
JAXWSServlet so that all calls to this endpoint are routed to our
servlet implementation - this modified descriptor is stored in the
generated directory - that is GF specific.

Vijay

>
>
> <web-app xmlns="http://java.sun.com/xml/ns/javaee"
> xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
> xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
> http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
>
> <description>WebTier for the Hello Service</description>
> <display-name>HelloWAR</display-name>
>
> <servlet>
> <description>Endpoint for Hello Web Service</description>
> <display-name>HelloWebService</display-name>
> <servlet-name>Hello</servlet-name>
> <servlet-class>endpoint.Hello</servlet-class>
> <load-on-startup>0</load-on-startup>
> </servlet>
>
> <servlet-mapping>
> <servlet-name>Hello</servlet-name>
> <url-pattern>/webservice/HelloService</url-pattern>
> </servlet-mapping>
>
> <session-config>
> <session-timeout>54</session-timeout>
> </session-config>
>
> </web-app>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>