Although it really is not important to have a web service descriptor for JAX-WS, Weblogic sometimes cannot identify WebServices (could not find the reason for this)
The following is what I did to get it working. Add the WebService implementation class as a servlet to web.xml
<?xml version='1.0' encoding='UTF-8'?> <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.4" id="WebApp_ID"> <display-name>MyWebService</display-name> <servlet> <servlet-name>serviceServlet</servlet-name> <servlet-class>com.aneesh.WebServiceImpl</servlet-class> <load-on-startup>0</load-on-startup> </servlet> <servlet-mapping> <servlet-name>serviceServlet</servlet-name> <url-pattern>/Service</url-pattern> </servlet-mapping> </web-app>
and add the webservice descriptor (webservices.xml)
<?xml version='1.0' encoding='UTF-8'?> <webservices xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.1"> <webservice-description> <webservice-description-name>MyWebService</webservice-description-name> <port-component> <port-component-name>MyWebServiceSoapPort</port-component-name> <wsdl-port xmlns:an="http://www.aneesh.com/service">an:MyWebServiceSoapPort</wsdl-port> <service-endpoint-interface>com.aneesh.WebService</service-endpoint-interface> <service-impl-bean> <servlet-link>serviceServlet</servlet-link> </service-impl-bean> </port-component> </webservice-description> </webservices>
source share