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 Bill Nagy <na...@watson.ibm.com> on 2006/09/15 22:54:29 UTC

[Axis2] Why does OutInAxisOperation invoke the InFlow and InFaultFlow when a fault is received in a response?

Is there a particular reason that the OutInAxisOperation invokes the
InFlow (via AxisEngine.receive()) for all response messages, even though
it could most likely use transport information (e.g. ask the transport
if an error was returned) to determine that a fault had occurred and
simply invoke the InFaultFlow (via AxisEngine.receiveFault())?  As it
stands now, the InFlow will be executed followed by the InFaultFlow.  If
the policy (i.e. set of QoS handlers) is different, executing the InFlow
could cause the message processing to fail when it would have succeeded
using the InFaultFlow.

-Bill



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Re: [Axis2] Why does OutInAxisOperation invoke the InFlow and InFaultFlow when a fault is received in a response?

Posted by Sanjiva Weerawarana <sa...@opensource.lk>.
On Sat, 2006-09-16 at 16:15 -0700, Bill Nagy wrote:
> Well, most transports have a status/error code for responses and if you
> came back through the normal chain (i.e. not via an AxisFault) it's
> probably a reasonably safe assumption that you have some sort of
> Envelope.

For HTTP responses this works because the status code must be 500 for a
message carrying a SOAP fault. But it doesn't work for async HTTP (two
channel case) or pretty much any other transport I think.

Anyway HTTP responses is a common enough case that its certainly
rational to special case, or rather to use the available info in that
case.

> In any event, ignoring the previous section, the code that executes the
> InFlow lives in OutInAxisOperation.send(...), and that already looks at
> the SOAPEnvelope.  It just always executes the InFlow without first
> looking to see if there was a fault.

+1 to changing that. Will anything break?? 

Sanjiva.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Re: [Axis2] Why does OutInAxisOperation invoke the InFlow and InFaultFlow when a fault is received in a response?

Posted by Bill Nagy <na...@watson.ibm.com>.
On Sat, 2006-09-16 at 23:47 +0530, Sanjiva Weerawarana wrote:
> On Fri, 2006-09-15 at 13:54 -0700, Bill Nagy wrote:
> > Is there a particular reason that the OutInAxisOperation invokes the
> > InFlow (via AxisEngine.receive()) for all response messages, even though
> > it could most likely use transport information (e.g. ask the transport
> > if an error was returned) to determine that a fault had occurred and
> > simply invoke the InFaultFlow (via AxisEngine.receiveFault())?  As it
> > stands now, the InFlow will be executed followed by the InFaultFlow.  If
> > the policy (i.e. set of QoS handlers) is different, executing the InFlow
> > could cause the message processing to fail when it would have succeeded
> > using the InFaultFlow.
> 
> Hmm. Good point but how do you tell that its a fault without looking at
> the SOAP message? How does the transport know that the payload is a SOAP
> Fault?

Well, most transports have a status/error code for responses and if you
came back through the normal chain (i.e. not via an AxisFault) it's
probably a reasonably safe assumption that you have some sort of
Envelope.

In any event, ignoring the previous section, the code that executes the
InFlow lives in OutInAxisOperation.send(...), and that already looks at
the SOAPEnvelope.  It just always executes the InFlow without first
looking to see if there was a fault.

-Bill



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Re: [Axis2] Why does OutInAxisOperation invoke the InFlow and InFaultFlow when a fault is received in a response?

Posted by Sanjiva Weerawarana <sa...@opensource.lk>.
On Fri, 2006-09-15 at 13:54 -0700, Bill Nagy wrote:
> Is there a particular reason that the OutInAxisOperation invokes the
> InFlow (via AxisEngine.receive()) for all response messages, even though
> it could most likely use transport information (e.g. ask the transport
> if an error was returned) to determine that a fault had occurred and
> simply invoke the InFaultFlow (via AxisEngine.receiveFault())?  As it
> stands now, the InFlow will be executed followed by the InFaultFlow.  If
> the policy (i.e. set of QoS handlers) is different, executing the InFlow
> could cause the message processing to fail when it would have succeeded
> using the InFaultFlow.

Hmm. Good point but how do you tell that its a fault without looking at
the SOAP message? How does the transport know that the payload is a SOAP
Fault?

Sanjiva.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org