I access a SOAP service using ADB-stubs created by AXIS2. I would like to log the raw XML response of any Axis Fault, that is returned by the service. I can catch those erro
Below is what you probably are looking for, yourStub
is what you generated via wsdl2java and use below lines after you make your request. The message is set to lastOperation
and sends it when you make the actual call:
request = yourStub._getServiceClient().getLastOperationContext().getMessageContext("Out")
.getEnvelope().toString());
response = yourStub._getServiceClient().getLastOperationContext().getMessageContext("In")
.getEnvelope().toString());
Hope that was helpful.