Hi every body,
I want to use " xpp3" Xml Pull Parser
(http://www.extreme.indiana.edu/xgws/xsoap/xpp/)
for implementing a method of a webservice.
The problem is the simple declaration of an Xstream crash the call of
this method:
My class implementing the service:
...
import com.thoughtworks.xstream.XStream; // for xpp3
...
public class MyServiceImpl {
public synchronized OMElement getObject(OMElement session) {
String s = new String("It's me!");
XStream xstream = new XStream(); // it's crash here!!!
String xml = xstream.toXML(s);
return OMETools.XML2OMElement(xml);
}
...
}
--> the call stack:
java.lang.ClassCastException
at
org.apache.axis2.soap.impl.llom.SOAPBodyImpl.getFault(SOAPBodyImpl.java:113)
at
org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:271)
at
org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:393)
at
org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:326)
at MyService.getObject...
Also, I use a no blocking REST call for the webservice AXIS2 v0.94
My question is, why just a declaration crash the call? Is it possible to
use xpp3 (another pull parser than stax)
in the java implementation of the webservice? Is it a problem with the
events of stax???!!!
Thank you in advance for your help!
Pascal