You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Pathak, Sanjesh" <Sa...@ENRON.com> on 2002/05/13 23:34:22 UTC

how do you access fault information in a handler

Hi Axis Developers,

How can I access fault information (faultcode, fault string and fault details) in the onFault method of a handler? For example, I tried to get the fault code this way:

Element faultElem = msgContext.getResponseMessage().getSOAPEnvelope().getAsDOM();
NodeList nl = faultElem.getElementsByTagName(org.apache.axis.Constants.ELEM_FAULT_CODE);
Node n = nl.item(0);
String faultCode = n.getFirstChild().getNodeValue();

I am getting a null value in the response message. Is there a way to get this infomation?

Sanjesh


**********************************************************************
This e-mail is the property of Enron Corp. and/or its relevant affiliate and may contain confidential and privileged material for the sole use of the intended recipient (s). Any review, use, distribution or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive for the recipient), please contact the sender or reply to Enron Corp. at enron.messaging.administration@enron.com and delete all copies of the message. This e-mail (and any attachments hereto) are not intended to be an offer (or an acceptance) and do not create or evidence a binding and enforceable contract between Enron Corp. (or any of its affiliates) and the intended recipient or any other party, and may not be relied on by anyone as the basis of a contract by estoppel or otherwise. Thank you. 
**********************************************************************