I tried deploying JAX Ws Servlet webservice in tomcat. If i give servlet class as <servlet-class>com.sun.xml.ws.transport.http.servlet.WSServlet</servlet-class> , i am getting the wsdl when i hit the URL.
But if i give my implementation class as servlet class it is not showing the wsdl.
<servlet-class>test.myService</servlet-class>
I already created web.xml and sun-jaxws.xml. Are you talking about server-config.wsdd?
Everything is fine if i give <servlet-class>com.sun.xml.ws.transport.http.servlet.WSServlet</servlet-class>
Are you developing a servlet or a web service? If the latter, then it should be listed in the sun-jaxws.xml file, not the web.xml file. In the web.xml file you need just the WSServlet declaration (and the WSServletContextListener listener).
Hi!
Specifying the endpoint implementation class that not is associated with an EJB is, according to the JSR-109 specification, allowed.
This would be a so-called servlet-based web service.
I recall that, when playing around with deployment descriptors when deploying a web service, if I had a web.xml deployment descriptor, then I also needed a webservices.xml deployment descriptor.
For details, see page 263- in my document that can be found here: http://www.javaforum.se/jforum/posts/list/549.page Best wishes!
I recall that, when playing around with deployment descriptors when deploying a web service, if I had a web.xml deployment descriptor, then I also needed a webservices.xml deployment descriptor.
I don't think that applies here - it's a "JAX-WS RI in Tomcat" scenario, where no webservices.xml file is involved.
Jobin Mathew wrote:I removed the entry from web.xml, but still i am getting 'resource not available' when i tried to see the wsdl.
The listing of HelloService2 is visible because it is defined in sun-jaxws.xml file but WSDL is inaccessible as there is no Servlet configured in web.xml to handle the /HelloService2 URL.
"The listing of HelloService2 is visible because it is defined in sun-jaxws.xml file but WSDL is inaccessible as there is no Servlet configured in web.xml to handle the /HelloService2 URL"
I agreed with this. But how can i see the wsdl here? In many examples i can see the servlet class is gievn as the implementation class instead of <servlet-class>com.sun.xml.ws.transport.http.servlet.WSServlet</servlet-class>. But I can see WSDL only if i give servlet class as com.sun.xml.ws.transport.http.servlet.WSServlet
In that case also it is giving "The requested resource (Servlet hello2 is not available) is not available."
But I can see the WSDL only if i give servlet class as <servlet-class>com.sun.xml.ws.transport.http.servlet.WSServlet</servlet-class>