dev@jax-ws.java.net

POJO with annotations using Resin app server

From: Dovholuk, Clint <Clint.Dovholuk_at_GlobalCrossing.com>
Date: Wed, 13 Sep 2006 09:41:13 -0400

Hi All, sorry for the post here, but I'm not seeing a lot of activity on
the 'users' mail list, so I thought I'd post here to see if there was
"anyone" out there... :)
 
I've been looking all over for documentation on how to do this, and I
can find none...
 
I have a very simple class taken from the netbeans website:
http://www.netbeans.org/kb/50/jaxws20.html
<BLOCKED::http://www.netbeans.org/kb/50/jaxws20.html> which I tried to
run using the Resin application container. I believe that the "default"
@SOAPBinding is document which would be great if it 'worked'. When I
use the default (ie: no @SOAPBinding specified) I get the following
error.
 
     WSSERVLET11: failed to parse runtime descriptor: class:
my.sample.server.jaxws.Hello could not be found
     class: my.sample.server.jaxws.Hello could not be found
 
However, if I set the SOAPBinding to be RPC (rpc/literal) then the web
service works as expected.... Can anyone offer any assistance?
 
Thanks, (source code below if you want it)
-cwd
 
ServiceImpl: (the web service)
      package my.sample.server;
      
      import javax.jws.WebParam;
      import javax.jws.WebService;
      import javax.jws.WebMethod;
      import javax.jws.soap.SOAPBinding;
      
      @WebService(name="Hello", serviceName="HelloService",
targetNamespace="http://example.com <BLOCKED::http://example.com> ")
      /*works*/_at_SOAPBinding(style=SOAPBinding.Style.RPC,
use=SOAPBinding.Use.LITERAL)
      /*fails*///_at_SOAPBinding(style=SOAPBinding.Style.DOCUMENT,
use=SOAPBinding.Use.LITERAL,
parameterStyle=SOAPBinding.ParameterStyle.WRAPPED)
      
      public class ServiceImpl {
        @WebMethod
        public String hello(@WebParam(name="name") String s) {
            System.out.println("Service received: " + s);
            return "Hello "+s;
        }
      }
 
web.xml:
  <servlet>
    <servlet-name>my_service</servlet-name>
 
<servlet-class>com.sun.xml.ws.transport.http.servlet.WSServlet</servlet-
class>
  </servlet>
  <servlet-mapping>
    <servlet-name>my_service</servlet-name>
    <url-pattern>/hello</url-pattern>
  </servlet-mapping>
 
sun-jaxws.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <endpoints xmlns='http://java.sun.com/xml/ns/jax-ws/ri/runtime'
version='2.0'>
      <endpoint
        name='Hello'
        implementation='my.sample.server.ServiceImpl'
        url-pattern='/hello'
      />
    </endpoints>