Raw SOAP XML response

"Sterpu Victor" <[email protected]>
Newsgroups gmane.text.xml.axis.user
Message-ID <emb04211b5-992b-4776-b83f-38ea891a4560@victor-pc>
Hello

I need to save the raw SOAP XML response from Axis2(I use axis 2 1.7.3).
When Axis2 call retusrns an error this code works: String response = 
sc.getLastOperationContext().getMessageContext("In").getEnvelope().toString();
But when I run a succesful Axis2 call the same code gives the following 
error: "java.lang.IllegalStateException: Can't process next node because 
caching is disabled"

I tryed to enable cache like this, but it didn't work:

                                 ServiceClient sc = 
(ServiceClient)method_getServiceClient.invoke(objectReflect);
                                 ServiceContext srv_context = 
sc.getServiceContext();
                                 
srv_context.setCachingOperationContext(true);
                                 OperationContext oc= new 
OperationContext();
                                 oc.setComplete(true);
                                 srv_context.setLastOperationContext(oc);

Thank you
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.