[jboss-user] [JBoss Web Services] - Re: NullPointerException when deploying JAX-WS web-service in com.sun.xml.ws.policy.jaxws.PolicyWSDLParserExtension line 980.

John Fitzpatrick do-not-reply at jboss.com
Thu Jan 19 18:50:32 EST 2012

John Fitzpatrick [https://community.jboss.org/people/jfitzpatrick] created the discussion

"Re: NullPointerException when deploying JAX-WS web-service in com.sun.xml.ws.policy.jaxws.PolicyWSDLParserExtension line 980."

To view the discussion, visit: https://community.jboss.org/message/647728#647728

I finally managed to find a solution to the problem although I do not know about about the detailed implementation to understand why my solution works.

When I initially started to work on getting something implemented, I looked at the JAX-WS samples which showed how to use the provider API and deploy using the sun-jaxws deployment descriptor. For some reason, deploying this way meant that the wsdl had to be in the WEB-INF directory of the war. Specifying the wsdl location to be anything but that caused an exception with a message saying that the wsdl location had to start with WEB-INF/wsdl. It seems that if on the other hand you use jbossws with the metro web-services stack and put the wsdl in the WEB-INF directory, you will get the exception described above. It seems that when I first started debugging the problem, I wrongly attributed the cause of the exception.

The summary is, if your implemented web-service has web methods that may throw exceptions, putting the wsdl in a sub-directory of the WEB-INF in the deployed war will cause the above issue. The solution is to put the wsdl at the root of the war, e.g. myapp.war/wsdl/...

Hopefully you find this thread before banging your head against the wall for a few days. If anyone has any insight as to why this happens, e.g. if it is a bug, etc, I would love to hear from you. Any Sun, ahem, I mean Oracle people care to comment?


Reply to this message by going to Community

Start a new discussion in JBoss Web Services at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120119/fbda5ba5/attachment.html 

More information about the jboss-user mailing list