• Post Reply Bookmark Topic Watch Topic
  • New Topic

org.apache.axis2.AxisFault on Client calling service  RSS feed

 
Mat Anthony
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 261
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ??
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!