What might be causing this NPE to be thrown while deploying my 109 service on GF?
Caused by: java.lang.NullPointerException
at com.sun.xml.ws.model.wsdl.WSDLBoundPortTypeImpl.freeze(WSDLBoundPortTypeImpl.java:203)
at com.sun.xml.ws.model.wsdl.WSDLModelImpl.freeze(WSDLModelImpl.java:221)
at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:134)
at com.sun.xml.ws.server.EndpointFactory.createSEIModel(EndpointFactory.java:234)
at com.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory.java:161)
at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:291)
at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:315)
at com.sun.enterprise.webservice.NewJAXWSServlet.registerEndpoint(NewJAXWSServlet.java:308)
at com.sun.enterprise.webservice.NewJAXWSServlet.doInit(NewJAXWSServlet.java:223)
... 46 more
web.xml
-------
<servlet>
<description>WS-Coordination createCoordinationContext service endpoint</description>
<display-name>WSCoord CreateCoordinationContext</display-name>
<servlet-name>ActivationCoordinatorPortTypeImpl</servlet-name>
<servlet-class>com.sun.org.xmlsoap.ws.coord.ActivationCoordinatorPortTypeImpl</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>ActivationCoordinatorPortTypeImpl</servlet-name>
<url-pattern>/wscoor/coordinator/createCoordinationContext</url-pattern>
</servlet-mapping>
ActivationCoordinatorPortType.java
----------------------------------
@WebService(name = "ActivationCoordinatorPortType",
targetNamespace = "
http://schemas.xmlsoap.org/ws/2004/10/wscoor",
wsdlLocation = "WEB-INF/wsdl/wscoor.wsdl")
@SOAPBinding(parameterStyle = ParameterStyle.BARE)
public interface ActivationCoordinatorPortType {...}
ActivationCoordinatorPortTypeImpl.java
--------------------------------------
@HandlerChain(file = "Handlers.xml")
@WebService(serviceName = "Coordinator",
portName = "ActivationCoordinator",
endpointInterface = "com.sun.org.xmlsoap.ws.coord.ActivationCoordinatorPortType",
targetNamespace = "
http://schemas.xmlsoap.org/ws/2004/10/wscoor",
wsdlLocation = "WEB-INF/wsdl/wscoor.wsdl")
public class ActivationCoordinatorPortTypeImpl implements ActivationCoordinatorPortType {...}
wscoor.wsdl
-----------
<wsdl:definitions>
...
<wsdl:service name="Coordinator">
<wsdl:port binding="wscoor:ActivationCoordinatorBinding" name="ActivationCoordinator">
<soap:address location="
http://localhost:8080/ActivationCoordinator"/>
</wsdl:port>
...
</wsdl:service>
</wsdl:definitions>
Thanks,
--Ryan
Bonus Question: why do I have to explicitly repeat the information from the
wsdl:service and wsd:port in my @WebService annotation? I couldn't get my
services to deploy at all when I tried to use the defaults nor when I tried
to change the names. The only way I could get it to work was to explicitly
copy the service and port names verbatim into my annotations. Then something
changed and I started getting the NPE at the top of the e-mail.