How do you configure jax-ws to work with Spring using jax-ws commons?
Posted
by LES2
on Stack Overflow
See other posts from Stack Overflow
or by LES2
Published on 2009-09-23T00:16:15Z
Indexed on
2010/05/16
1:50 UTC
Read the original article
Hit count: 397
In web.xml I have the following:
<servlet>
<description>JAX-WS endpoint - EARM</description>
<display-name>jaxws-servlet</display-name>
<servlet-name>jaxws-servlet</servlet-name>
<servlet-class>com.sun.xml.ws.transport.http.servlet.WSSpringServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>jaxws-servlet</servlet-name>
<url-pattern>/webServices/*</url-pattern>
</servlet-mapping>
In my application context I have the following definitions:
<bean id="helloService" class="com.foo.HelloServiceImpl">
<property name="regularService" ref="regularService" />
</bean>
<wss:binding url="/webServices/helloService" service="#helloService" />
I get a NullPointerException
when trying to access the WSDL:
java.lang.NullPointerException
at com.sun.xml.ws.transport.http.HttpAdapter.<init>(HttpAdapter.java:145)
at com.sun.xml.ws.transport.http.servlet.ServletAdapter.<init>(ServletAdapter.java:76)
at com.sun.xml.ws.transport.http.servlet.ServletAdapterList.createHttpAdapter(ServletAdapterList.java:5 0)
at com.sun.xml.ws.transport.http.servlet.ServletAdapterList.createHttpAdapter(ServletAdapterList.java:4 7)
at com.sun.xml.ws.transport.http.HttpAdapterList.createAdapter(HttpAdapterList.java:73)
at com.sun.xml.ws.transport.http.servlet.SpringBinding.create(SpringBinding.java:24)
at com.sun.xml.ws.transport.http.servlet.WSSpringServlet.init(WSSpringServlet.java:46)
Strange ... appears to be a configuration error but the darn thing just dies with a NullPointerException
!!!!!!!! No logging is provided.
Deployed in Resin.
© Stack Overflow or respective owner