I am implementing a JAX-WS using the following stack:
* Spring 3.0.7.RELEASE
* JAXB 2.2.11
* CXF 3.1.10
Yes, this is an OLD version of Spring, but it cannot be upgraded at this time.
I prototyped this service in another, minimal project using:
* Spring 4.3.9.RELEASE
* (others the same as above)
The service beans are declared in a Spring configuration XML file:
<jaxws:endpoint
id="havaServiceEndpoint"
implementorClass="gov.texas.dps.dl.dls.ws.hava.service.HavaServiceImpl"
address="/havaService"
/>
The CXF servlet is registered in web.xml:
<servlet>
<servlet-name>CXF Servlet</servlet-name>
<servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
<load-on-startup>9</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>CXF Servlet</servlet-name>
<url-pattern>/newservices/*</url-pattern>
</servlet-mapping>
Though the services compile and deploy w/o issue:
Aug01 12:05:01.657 INFO [ReflectionServiceFactoryBean ][::] - Creating Service
{http://gov.texas.dps/dl/dls/ws/hava}HavaService from class
gov.texas.dps.dl.dls.ws.hava.service.HavaService
Aug01 12:05:01.728 INFO [ServerImpl ][::] - Setting the
server's publish address to be /havaService
When I access the service's ?wsdl URL, a NPE is thrown from inside CXF:
java.lang.NullPointerException
at
org.apache.cxf.service.invoker.PerRequestFactory.create(PerRequestFactory.java:56)
at
org.apache.cxf.service.invoker.SingletonFactory.createBean(SingletonFactory.java:52)
at
org.apache.cxf.service.invoker.SingletonFactory.create(SingletonFactory.java:45)
at
org.apache.cxf.service.invoker.FactoryInvoker.getServiceObject(FactoryInvoker.java:54)
at
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java)
at
org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:262)
at
org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:234)
at
org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:208)
at
org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160)
at
org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:180)
at
org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:299)
at
org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:223)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:618)
...
I don't understand what is going wrong. Accessing the WSDL URL in the test
application works just fine.
I've looked at PerRequestFactory.create, but the code means nothing to me.
Can someone suggest what might be going on?