jax-ws - please help!

I am new to java ws and have been struggling with this error for a long time. Any help at all will sure be appreciated!

Stack Trace, wsdl, sun-jaxws.xml, web.xml are below. I am deploying to Tomcat 6

The error is:

SEVERE: WSSERVLET11: failed to parse runtime descriptor: could not get binding from WSDL! service: {http://webservice/}BackgroundCheckService or port {http://webservice/}BackgroundCheckPort not found in the WSDL jndi:/localhost/xmlinterface/WEB-INF/wsdl/BackgroundCheck.wsdl
could not get binding from WSDL! service: {http://webservice/}BackgroundCheckService or port {http://webservice/}BackgroundCheckPort not found in the WSDL jndi:/localhost/xmlinterface/WEB-INF/wsdl/BackgroundCheck.wsdl


My sun-jaxws.xml file looks like (you will see I have tried populating the optional wsdl, service and port attributes of the endpoint tag but the error remains)

<?xml version="1.0" encoding="UTF-8"?>

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

<endpoint
name='BackgroundCheck'
implementation='webservice.BackgroundCheck'
wsdl='WEB-INF/wsdl/BackgroundCheck.wsdl'
service='{http://webservice/}BackgroundCheckService'
port='{http://webservice/}BackgroundCheckPort'
url-pattern='/xmlinterface/BackgroundCheck'/>

</endpoints>

My WSDL:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<definitions targetNamespace="http://webservice" name="BackgroundCheck" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://webservice" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<import namespace="http://webservice/" location="BackgroundCheckPortType.wsdl"/>
<binding name="BackgroundCheckBinding" type="ns1:BackgroundCheck" xmlns:ns1="http://webservice/">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
<operation name="requestBackgroundCheck">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
<operation name="retrieveBackgroundCheck">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
<service name="BackgroundCheck">
<port name="BackgroundCheck" binding="tns:BackgroundCheckBinding">
<soap:address location="http://localhost:8080/xmlinterface/BackgroundCheck"/>
</port>
</service>
</definitions>

Finally my web xml:

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
version="2.5">

<listener>
<listener-class>com.sun.xml.ws.transport.http.servlet.WSServletContextListener</listener-class>
</listener>
<servlet>
<description>JAX-WS endpoint</description>
<display-name>WSServlet</display-name>
<servlet-name>WSServlet</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>WSServlet</servlet-name>
<url-pattern>/xmlinterface/*</url-pattern>
</servlet-mapping>
</web-app>

1 comment
Comment actions Permalink

I figured this out, or rather went the smarter route of letteing IntelliJ create the .war file and what-do-ya-know it works perfectly.

0

Please sign in to leave a comment.