It looks like you don't have cxf-rt-frontend-jaxws in the classpath
and you are using sun's implementation and not cxf's.

If the error persists after switching to cxf, I suppose there could be
something wrong with your rpc.xml file.

Regards, aki

2012/7/6 kdesin <[email protected]>:
> 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.

Reply via email to