aspose file tools*
The moose likes Web Services and the fly likes dynamic invocation client Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "dynamic invocation client" Watch "dynamic invocation client" New topic
Author

dynamic invocation client

Hlias Makis
Greenhorn

Joined: May 21, 2012
Posts: 10


how can i build a dynamic invocation client using jax ws



Ramita Sardana
Greenhorn

Joined: Jul 15, 2011
Posts: 2

Even I am looking for a solution for this...
I have been able to get the client, parse the wsdl and find the operations from binding...but i am getting errors during invocation...

The code snippet is like:

Client client = new ClientImpl(wsdlUrl, portQname);
....
Object[] inputs = new Object(){2, 3};
client.invoke("add", inputs); //add is the operation name i wanna call

This is giving me NullPointerException as follows...

org.apache.cxf.phase.PhaseInterceptorChain doIntercept
INFO: Interceptor has thrown exception, unwinding now
java.lang.NullPointerException
at org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writeToOutputStream(AbstractOutDatabindingInterceptor.java:151)
at org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writeParts(AbstractOutDatabindingInterceptor.java:88)
at org.apache.cxf.interceptor.BareOutInterceptor.handleMessage(BareOutInterceptor.java:68)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:469)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:299)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:251)
at org.apache.cxf.endpoint.ClientImpl.invokeWrapped(ClientImpl.java:286)
at org.apache.cxf.endpoint.ClientImpl.invokeWrapped(ClientImpl.java:277)

Any help in this regard will be highly appreciated.

Thanks and Regards,
Ramita
mc gk
Greenhorn

Joined: Aug 24, 2012
Posts: 1
Any suggestion on fix? what caused this issue?
I am also facing same problem.

Root Exception stack trace:
java.lang.NullPointerException
at org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writeToOutputStream(AbstractOutDatabindingInterceptor.java:151)
at org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writeParts(AbstractOutDatabindingInterceptor.java:88)
at org.apache.cxf.interceptor.BareOutInterceptor.handleMessage(BareOutInterceptor.java:68)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:472)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:302)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:254)
at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:127)

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: dynamic invocation client