JBoss Community

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

created by Guillermo L in JBoss Web Services - View the full discussion

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"), new QName("http://myws.com/", "MyService"));

 

This causes the java client to get the the wsdl at 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 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?wsdl"), new QName("http://myws.com/", "MyService"));

 

Hope this helps other guys out there!

Reply to this message by going to Community

Start a new discussion in JBoss Web Services at Community