Perhaps my blog entry can be of help with using the Dispatch interface:
http://www.jroller.com/gmazza/entry/calling_rpc_encoded_web_services.
Otherwise, JAX-RPC is yesterday's lard, I don't think we'd want to weigh
down CXF by supporting that, it's kind of like asking iPod to support
cassette tapes. If Dispatch is too ugly, Axis 1 is the usual option for
JAX-RPC.
Glen
On 07/06/2012 08:05 AM, kdesin wrote:
Hi all,
I deeply wish that there is support for JAX-RPC from the current
implementation of CXF:
I am in a situation where I need to consume a JAX-RPC webservice using
JAX-WS support.
I know that migrating to JAX-WS entirely is the best option but due to some
vendor issues we cannot do that.
I have come across the Dispatch API in JAX-WS to achieve this.(Our services
layer runs on CXF so I am forced to go via this route)
All I am trying is to write a standalone client to invoke the RPC service
and display the output.
Please let me know how to resolve this error:
Service service = Service.create(url, SERVICE);
javax.xml.ws.Dispatch dispatch =
service.createDispatch(GatewaySoapPort,javax.xml.transform.Source.class,
Service.Mode.PAYLOAD); Source req = new StreamSource("rpc.xml");
Source res = dispatch.invoke(req); /*Error at this point*/
Exception:
Exception in thread "main" javax.xml.ws.WebServiceException:
java.lang.IllegalStateException: Current event not START_ELEMENT or
END_ELEMENT at
com.sun.xml.ws.encoding.soap.client.SOAPXMLDecoder.toInternalMessage(SOAPXMLDecoder.java:263)
at
com.sun.xml.ws.protocol.soap.client.SOAPMessageDispatcher.receive(SOAPMessageDispatcher.java:545)
at
com.sun.xml.ws.protocol.soap.client.SOAPMessageDispatcher.doSend(SOAPMessageDispatcher.java:288)
at
com.sun.xml.ws.protocol.soap.client.SOAPMessageDispatcher.send(SOAPMessageDispatcher.java:153)
at
com.sun.xml.ws.client.dispatch.impl.DispatchDelegate.send(DispatchDelegate.java:71)
at
com.sun.xml.ws.client.dispatch.DispatchBase.sendAndReceive(DispatchBase.java:308)
at com.sun.xml.ws.client.dispatch.DispatchBase.invoke(DispatchBase.java:133)
-----
Saludos
Kartheek
--
View this message in context:
http://cxf.547215.n5.nabble.com/Using-JAX-WS-support-for-JAX-RPC-service-Dispatch-API-tp5710673.html
Sent from the cxf-user mailing list archive at Nabble.com.
--
Glen Mazza
Talend Community Coders
coders.talend.com
blog: www.jroller.com/gmazza