axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From SGE0 <>
Subject How can Axis2/Java 1.4.1 client detect soap response contains a <soapenv:Fault> ?
Date Wed, 11 Nov 2009 12:13:12 GMT


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

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 =

      // 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="">
        <soapenv:Text xml:lang="en-US">documentUUID has not correct format.
Should start with urn:uuid: dddd</soapenv:Text>
      <soapenv:Detail />
View this message in context:
Sent from the Axis - User mailing list archive at

View raw message