To deploy a webservice on Sun Application Server 9.0_01

Hello,

I developed a very simple service class annotated with @WebService.

If I copy the class directly in the autodeploy, the server starts

automatically everything and I see it on the web services, and

also the call to http://server/MyService/MyService?WSDL works fine.

If I package the class (along with those generated by apt) inside a war,

the server sees it as a web application, and not as a webservice. Why?

The content of the war is:

META-INF/MANIFEST.MF

WEB-INF/sun-jaxws.xml

WEB-INF/web.xml

WEB-INF/classes/server/Util.class

WEB-INF/classes/server/MyService.class

WEB-INF/classes/server/jaxws/GetName.class

WEB-INF/classes/server/jaxws/GetNameResponse.class

WEB-INF/classes/server/jaxws/IOExceptionBean.class

The web.xml is:

...

<web-app>

<listener>

<listener-class>com.sun.xml.ws.transport.http.servlet.WSServletContextListener</listener-class>

</listener>

<servlet>

<servlet-name>MyService</servlet-name>

<servlet-class>com.sun.xml.ws.transport.http.servlet.WSServlet</servlet-class>

<load-on-startup>1</load-on-startup>

</servlet>

<servlet-mapping>

<servlet-name>MyService</servlet-name>

<url-pattern>/MyService</url-pattern>

</servlet-mapping>

<session-config>

<session-timeout>60</session-timeout>

</session-config>

</web-app>

and the sun-jaxws is:

<endpoints xmlns="http://java.sun.com/xml/ns/jax-ws/ri/runtime" version="2.0">

<endpoint name="MyService"

implementation="server.MyService"

url-pattern="/MyService"/>

</endpoints>

Where do I wrong?

Thanks

[1911 byte] By [quazarbluea] at [2007-11-27 9:16:17]
# 1
because using sun-jaxws.xml is a non-standard deployment descriptor. You need to use just the web.xml and instead of pointing at the JAX-WS RI servlet, point it at your endpoint implementation class. The AS 9 tutorial should show an example of this.
dkohlerta at 2007-7-12 22:05:58 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...