axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pathak, Sanjesh" <Sanjesh.Pat...@ENRON.com>
Subject RE: fault info
Date Mon, 26 Aug 2002 14:42:42 GMT
Chris,

Thanks a bunch for replying to my questions. I have my FaultLogHandler (see attached WSDDD
file) on the top of the request flow. I hope this catches all faults that may occur anywhere
(my other handlers and the service). I am logging fault info in the onFault method of the
FaultLogHandler.

I am going to make the change as you suggested to get the response message. Thank you very
much for replying and voluntering to work on the patch to address this issue.

Sanjesh


-----Original Message-----
From: Chris Haddad [mailto:haddadc@apache.org]
Sent: Saturday, August 24, 2002 12:41 AM
To: axis-dev@xml.apache.org
Cc: axis-user@xml.apache.org
Subject: RE: fault info


Sanjesh -

The onFault method is only called for handlers that have executed *before*
the fault occurs.  To ensure that your method is called, move the handler
to the top of the handler definitions for the service.

Your code example references the request message instead of the response
message.  Changing the code to SOAPMessage message =
msgContext.getResponseMessage();   will reference the proper context to
catch a fault.

Because the soap envelope containing the fault is not created until after
the onFault methods have been called, the fault details are not
accessible in the onFault method(s).  I'm going to check in a patch that
will address this issue and provide you with access to the fault details.


cheers,

/Chris


On Fri, 23 Aug 2002, Pathak, Sanjesh wrote:

> Hi Guys,
>
> I am re-posting this message as I have not received any response so far. Is this a bug?
Or it is a feature not yet implemented. Any answer would be appreciated. Please.
>
> Sanjesh
>
> -----Original Message-----
> From: Pathak, Sanjesh
> Sent: Friday, August 16, 2002 2:34 PM
> To: axis-user@xml.apache.org
> Cc: axis-dev@xml.apache.org
> Subject: fault info
>
>
>
> I am trying to extract fault information from within a handler and so far has been unsuccessfull.
Has anyone been successfull in extracting fault info from handler?
>
> I have tried to get fault like this in the onFault() method of the handler:
>
> SOAPMessage message = msgContext.getMessage();
> if (message.getSOAPPart().getEnvelope().getBody().hasFault()) {
>    // get info here
>    String faultString = message.getSOAPPart().getEnvelope().getBody().getFault().getFaultString();
> }
>
> but message.getSOAPPart().getEnvelope().getBody().hasFault() always returns false. The
SOAPMessage in MessageContext does not have any fault info even if a fault occurs (I can see
the fault on the client side and tcpmon). On another note, if I put the handler in <faultFlow></faultFlow>,
the handler never gets executed.
>
> Any information on extracting fault info would be helpful.
>
> Thanks,
> 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.
> **********************************************************************
>
>


Mime
View raw message