Discussion:
[jboss-user] [JBoss Web Services] - Re: org.apache.cxf.phase.PhaseInterceptorChain NullPointerException
Guillermo L
2013-07-10 17:48:46 UTC
Permalink
Guillermo L [https://community.jboss.org/people/gmlopezdev] created the discussion

"Re: org.apache.cxf.phase.PhaseInterceptorChain NullPointerException"

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

--------------------------------------------------------------
Well, actually this was (as usual :p )  a bug between the chair and the keyboard :D .

As I initially posted, it appeared to be a problem within the client since I don't get this exception when I call it using another tool.

When I first coded the java client I coded the service instantiation as the following:

    Service service = MyService_Service.create(new URL(" http://localhost:8080/myApp/soap/MyService http://localhost:8080/myApp/soap/MyService"), new QName(" http://myws.com/ http://myws.com/", "MyService"));

This causes the java client to get the the wsdl at http://localhost:8080/myApp/soap/MyService http://localhost:8080/myApp/soap/MyService which it is not the right location (?wsdl is missing). Since it fails, it then tries http://localhost:8080/myApp/soap/MyService?wsdl http://localhost:8080/myApp/soap/MyService?wsdl and succeeds as expected however we can see the previous error log on the server.

So when you code the client, pass the right and expected parameters as theyÂŽre specified. The "create" signature clearly states "wsdlDocumentLocation" so I should just have placed the right wsdl location when instantiating the service by using the wsdl parameter:

    Service service = MyService_Service.create(new URL(" http://localhost:8080/myApp/soap/MyService http://localhost:8080/myApp/soap/MyService*?wsdl*"), new QName(" http://myws.com/ http://myws.com/", "MyService"));

Hope this helps other guys out there!
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/827380#827380]

Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]
Loading...