Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

dynamic invocation client

 
Hlias Makis
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


how can i build a dynamic invocation client using jax ws



 
Ramita Sardana
Greenhorn
Posts: 2
Eclipse IDE Java Netbeans IDE
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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)

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic