Hi,
we have a Axis2/Java 1.4.1 client which sends a soap request and gets back a
soap response containing a <soapenv:Fault>.
We want to throw an error in case the soap response contains a
<soapenv:Fault>.
How can we detect the soap response contains a <soapenv:Fault> ?
We use client classes derived with wsdl2java (adb).
The code is as follows:
... prepare the soaprequest...
// Send the request
....client.remove.RemoveStub.RequestResponse resp =
stub.request(operation);
// In case an <soapenv:Fault> is returnd, throw error
???? ????
// The response object contains a reference to this request
String UUID = resp.get_return();
An example of a response with <soapenv:Fault>
<?xml version='1.0' encoding='utf-8'?>
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
<soapenv:Body>
<soapenv:Fault>
<soapenv:Code>
<soapenv:Value>soapenv:Receiver</soapenv:Value>
</soapenv:Code>
<soapenv:Reason>
<soapenv:Text xml:lang="en-US">documentUUID has not correct format.
Should start with urn:uuid: dddd</soapenv:Text>
</soapenv:Reason>
<soapenv:Detail />
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
--
View this message in context:
http://old.nabble.com/How-can-Axis2-Java-1.4.1-client-detect-soap-response-contains-a-%3Csoapenv%3AFault%3E---tp26300313p26300313.html
Sent from the Axis - User mailing list archive at Nabble.com.