axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Schwartz, Brenton" <bjsc...@qwest.com>
Subject RE: AxisFault vs SOAP Fault
Date Thu, 30 May 2002 14:12:18 GMT
Axis.GetFaultDetails returns an array of Elements
Cycling on these elements all I get is a stack trace
in element[0] and nothing else.  I suspect that this
is because Axis threw an exception when trying
to read the details and put the stack trace in that
slot for safe keeping...
 
Next way to attempt a solution:  Does anyone know
a way to get at the raw SOAP message returned from
the commmunication.  If I can use DOM to get at the
value or in the worst case I can use a regular expression
to yank the value out of the string.
 
Thanks
Brent
I can either use or 

-----Original Message-----
From: R J Scheuerle Jr [mailto:scheu@us.ibm.com]
Sent: Wednesday, May 29, 2002 5:37 PM
To: axis-user@xml.apache.org
Subject: RE: AxisFault vs SOAP Fault



This may be related to the fact that axis does not adequately
serializer/deserialize the contents of the fault. 

Did you try Axis.getFaultDetails ? 

Rich Scheuerle
XML & Web Services Development
512-838-5115  (IBM TL 678-5115) 



	"Schwartz, Brenton" <bjschwa@qwest.com> 


05/29/2002 05:23 PM 
Please respond to axis-user 


        
        To:        "'axis-user@xml.apache.org'" <axis-user@xml.apache.org> 
        cc:         
        Subject:        RE: AxisFault vs SOAP Fault 

       


Thanks for the try, 

System.out.println(AxisFault.getFaultCode() );
prints the value "Server"
which is the <soap-env:faultcode>Server </soap-env:faultcode>
out of the soap message not the message several layers
down which contains the actual <e:errorCode>4500</e:errorCode>
that I need access to.
 
I found an archived message from
Subject:  mapping javax.xml.soap.SOAPFault to AxisFault
From:     "Chris Haddad" <chris.haddad@cobia.net>
Date:     2002-03-27 18:01:13
that implies that this is a deeper problem...

Brent
-----Original Message-----
From: R J Scheuerle Jr [mailto:scheu@us.ibm.com]
Sent: Wednesday, May 29, 2002 5:07 PM
To: axis-user@xml.apache.org
Subject: Re: AxisFault vs SOAP Fault



The fault "contents" currently are not passed across the wire. 

Use AxisFault.getFaultCode() to get the fault code. 

Hope this helps. 

Rich Scheuerle
XML & Web Services Development
512-838-5115  (IBM TL 678-5115) 


"Schwartz, Brenton" <bjschwa@qwest.com> 
05/29/2002 05:03 PM 
Please respond to axis-user 
       
       To:        "'axis-user@xml.apache.org'" <axis-user@xml.apache.org> 
       cc:         
       Subject:        AxisFault vs SOAP Fault 

      


I am having trouble getting the fault code out of a SOAP message

Environment:
-------------------------------
SunOS zima 5.8 Generic_111433-02 sun4u sparc SUNW,Sun-Blade-1000
java version "1.4.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-b92)
Java HotSpot(TM) Client VM (build 1.4.0-b92, mixed mode)
axis Beta2, Nightly Release 28 May 02

The value I want to access:
---------------------------------
<e:errorCode>4500</e:errorCode>

Soap Message Returned:
---------------------------------
<soap-env:Envelope
xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
<soap-env:Header>
<qxg:TASK_ID
xmlns:qxg="http://www.qwest.com/qxg/">KG0UW67N.19SSDJ0.UXFLKZ</qxg:TASK_ID>
</soap-env:Header>
<soap-env:Body>
<soap-env:Fault>
<soap-env:faultactor>http://www.qwest.com/qxg/jmsqueue/DefaultBusinessLogicQ
ueue/BAAGetOrderStatusResultActor </soap-env:faultactor>
<soap-env:faultcode>Server </soap-env:faultcode>
<soap-env:faultstring>Rejected - Order does not exist
</soap-env:faultstring>
<soap-env:Detail>
<e:faultDetails xmlns:e="http://www.qwest.com/qxg/">
<e:message>Rejected - Order does not exist </e:message>
<e:errorCode>4500 </e:errorCode> 
</e:faultDetails>
</soap-env:Detail>
</soap-env:Fault>
</soap-env:Body>
</soap-env:Envelope>

Code Fragment where I am trying to access the data:
---------------------------------------
catch (org.apache.axis.AxisFault e)
{
System.out.println(e.dumpToString());

// I want to be able to access the value
// here so I can do processing on it.
}

What I get from the Dump:
----------------------------------------------------
AxisFault
faultCode: Server
faultString: Rejected - Order does not exist
faultActor:
http://www.qwest.com/qxg/jmsqueue/DefaultBusinessLogicQueue/BAAGetOrderStatu
sResultActor
faultDetail: 
stackTrace: Rejected - Order does not exist
at
org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:13
4)
at
org.apache.axis.encoding.DeserializationContextImpl.endElement(Deserializati
onContextImpl.java:917)
at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1528)
at org.apache.crimson.parser.Parser2.content(Parser2.java:1779)
at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1507)
at org.apache.crimson.parser.Parser2.content(Parser2.java:1779)
at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1507)
at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:500)
at org.apache.crimson.parser.Parser2.parse(Parser2.java:305)
at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442) 
at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
at
org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationCon
textImpl.java:217)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:443)
at org.apache.axis.client.Call.invoke(Call.java:1917)
at org.apache.axis.client.Call.invoke(Call.java:1684)
at org.apache.axis.client.Call.invoke(Call.java:1612)
at org.apache.axis.client.Call.invoke(Call.java:1174)
at
com.qwest.www.BAAGetOrderStatusResultBindingStub.BAAGetOrderStatusResult(BAA
GetOrderStatusResultBindingStub.java:167)
at
com.qwest.www.Baa_Get_Order_Status_Result.GetOrderStatusResult(Baa_Get_Order
_Status_Result.java:95)
at
com.qwest.www.Baa_Get_Order_Status_Result.main(Baa_Get_Order_Status_Result.j
ava:142)

What can I do to get this information back out of the SOAP
message?  I have tried quite a number of ways but nothing I have found
so far has lead me to success.

Brent





Mime
View raw message