my dog learned polymorphism*
The moose likes Web Services and the fly likes org.apache.axis2.AxisFault on Client calling service Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "org.apache.axis2.AxisFault on Client calling service" Watch "org.apache.axis2.AxisFault on Client calling service" New topic
Author

org.apache.axis2.AxisFault on Client calling service

Mat Anthony
Ranch Hand

Joined: May 21, 2008
Posts: 232
Hi All,
I'm currently using axis2 to provide web services. I created a client to call one of my web services
and got the following error:-
org.apache.axis2.AxisFault: Problem with saving document at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)

On debugging, I found that before the service returned, the xml result looked ok. On the service return the above error occurred?



Mat Anthony
Ranch Hand

Joined: May 21, 2008
Posts: 232
Hi All,
on debugging my code I found that WSDL2Java generated class MyServiceImplMessageReceiverInOut
was throwing the following error in method serialize:-

org.apache.axis2.AxisFault: Problem with saving document
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)


public class MyServiceImplMessageReceiverInOut extends org.apache.axis2.receivers.AbstractInOutMessageReceiver{


public void serialize(javax.xml.stream.XMLStreamWriter xmlStreamWriter)
throws javax.xml.stream.XMLStreamException {
org.apache.axiom.om.impl.MTOMXMLStreamWriter mtomxmlStreamWriter =
(org.apache.axiom.om.impl.MTOMXMLStreamWriter) xmlStreamWriter;
try {
org.apache.xmlbeans.XmlOptions xmlOptions = new org.apache.xmlbeans.XmlOptions();
param.save(mtomxmlStreamWriter.getOutputStream(),xmlOptions.setSaveNoXmlDecl());
mtomxmlStreamWriter.getOutputStream().flush();
} catch (java.io.IOException e) {
throw new javax.xml.stream.XMLStreamException("Problem with saving document", e);
}
}

}

Has anybody got any clue why this should happen, since this seems to called after the return from the service call ??
 
jQuery in Action, 2nd edition
 
subject: org.apache.axis2.AxisFault on Client calling service
 
Similar Threads
Axis2/Rampart problem. Certificate not found for user.
Exceptions in Web Service consumption
ERROR in WebService AXIS2
JAX-WS issue
Deserialisation failed