users@jax-rpc.java.net

RE: How does HandleFault get invoked in Handler.

From: Mark Hansen <khookguy_at_yahoo.com>
Date: Thu, 8 Jan 2004 10:56:10 -0500

Can someone clarify handleFault() vs. handleResponse() ???

If a SOAP Fault message gets sent back from the service endpoint to a
JAX-RPC client with a client-side handler, on receiving this SOAP Fault
message (i.e., per the SOAP 1.1 spec, Sec 5.4 ... it "contains a single SOAP
Fault element information item as the only child element information item of
the SOAP Body") which of these methods gets called by the JAX-RPC runtime?

I have been assuming that handleFault() would process these "SOAP Fault"
responses, but that is not how it works in Axis. Perhaps I am wrong, and
handleFault() is only supposed to be called when a SOAPFaultException is
thrown by an upstream handler in the HandlerChain. The JAX-RPC
specification doesn't seem very clear on this.

Thanks,

Mark

> -----Original Message-----
> From: Purbhoo, Hansika [mailto:PurbhooH_at_scmb.co.za]
> Sent: Thursday, December 18, 2003 5:51 AM
> To: users_at_jax-rpc.dev.java.net
> Subject: RE: How does HandleFault get invoked in Handler.
>
>
> Thanks Kevin......that works fine
> (I also checked and its also well documented in the JAX-RPC
> specification )
>
> -----Original Message-----
> From: Kevin Jones [mailto:kevinj_at_develop.com]
> Sent: 18 December 2003 12:45
> To: users_at_jax-rpc.dev.java.net
> Subject: RE: How does HandleFault get invoked in Handler.
>
>
> You need to throw a SOAPFaultException, then you will see the
> handleFault being called instead of handleResponse,
>
> Kevin Jones
> http://kevinj.develop.com
>
> > -----Original Message-----
> > From: Purbhoo, Hansika [mailto:PurbhooH_at_scmb.co.za]
> > Sent: 18 December 2003 05:46
> > To: users_at_jax-rpc.dev.java.net
> > Subject: How does HandleFault get invoked in Handler.
> >
> >
> > Hi
> > Does anyone know how to invoke handleFault(MessageContxt ctx)
> > method in a Handler class ? The printlns for the other
> > methods get printed out, so I know that the Handler class is
> > being called and is correctly configured. I have tried
> > thowing a JaxRPCException from my method call in the
> > Implementation class, but this simply fails.
> >
> >
> > My Handler class is as follows:
> > -----------------
> > public class ServerHandler extends GenericHandler {
> > public ServerHandler() {
> > }
> >
> > public boolean handleResponse(MessageContext context) {
> > System.out.println("In the response method:");
> > return true;
> > }
> >
> > public void init(HandlerInfo hi) {
> > System.out.println("In the init method::");
> > }
> >
> > public boolean handleRequest(MessageContext context) {
> > System.out.println("In the Handle request method:");
> > return true;
> > }
> >
> > public boolean handleFault(MessageContext context) {
> > System.out.println("In the Handle fault method:");
> > //Want to do stuff like create a Soap Fault
> > return true;
> > }
> >
> >
> > public void destroy() { }
> >
> > public QName[] getHeaders() { return null; }
> >
> >
> > }
> > -----------------------
> >
> > Any Help would be much appreciated
> > Thanks
> >
> >
> >
> >
> >
> >
> > ______________________________________________________________
> > ____________________________________________________________________
> >
> > For information about the Standard Bank group visit our web
> > site <www.standardbank.co.za>
> > ______________________________________________________________
> > ____________________________________________________________________
> >
> > Disclaimer and confidentiality note
> > Everything in this e-mail and any attachments relating to the
> > official business of Standard Bank Group Limited is
> > proprietary to the group.
> > It is confidential, legally privileged and protected by law.
> > Standard Bank does not own and endorse any other content.
> > Views and opinions are those of the sender unless clearly
> > stated as being that of the group.
> > The person addressed in the e-mail is the sole authorised
> > recipient. Please notify the sender immediately if it has
> > unintentionally reached you and do not read,
> > disclose or use the content in any way.
> > Standard Bank can not assure that the integrity of this
> > communication has been maintained nor that it is free of
> > errors, virus, interception or interference.
> > ______________________________________________________________
> >
> _____________________________________________________________________
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe_at_jax-rpc.dev.java.net
> > For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jax-rpc.dev.java.net
> For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net
>
> ______________________________________________________________
> ____________________________________________________________________
>
> For information about the Standard Bank group visit our web
> site <www.standardbank.co.za>
> ______________________________________________________________
> ____________________________________________________________________
>
> Disclaimer and confidentiality note
> Everything in this e-mail and any attachments relating to the
> official business of Standard Bank Group Limited is
> proprietary to the group.
> It is confidential, legally privileged and protected by law.
> Standard Bank does not own and endorse any other content.
> Views and opinions are those of the sender unless clearly
> stated as being that of the group.
> The person addressed in the e-mail is the sole authorised
> recipient. Please notify the sender immediately if it has
> unintentionally reached you and do not read,
> disclose or use the content in any way.
> Standard Bank can not assure that the integrity of this
> communication has been maintained nor that it is free of
> errors, virus, interception or interference.
> ______________________________________________________________
> _____________________________________________________________________
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jax-rpc.dev.java.net
> For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net
>