axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sanjiva Weerawarana <>
Subject Re: [axis2] Heads-up - AxisEngine work
Date Fri, 11 May 2007 10:20:07 GMT
Glen Daniels wrote:
> Hi folks!
> Cleaning up some logic in AxisEngine and related areas.
> There are a bunch of places where you'll see this code scattered around:
>    if (msgContext.getEnvelope().getBody.hasFault()) {
>      axisEngine.receiveFault(msgContext);
>    } else {
>      axisEngine.receive(msgContext);
>    }
> If you go look at AxisEngine.receive() vs. AxisEngine.receiveFault() 
> they are almost identical.  In other words, there is a bunch of repeated 
> code and an opportunity for things to get out of sync.
> Also, the above code is just silly to have repeated all over the place, 
> and it really shouldn't be something a transport author should need to 
> worry about.


> Hence, I'm removing AxisEngine.receiveFault() and making receive() do 
> the above check before deciding which flow (IN or IN_FAULT) to use.  The 
> check also will become MessageContext.isFault() instead of having to dig 
> into the SOAP body - let the MC do that.

+1 .. but I suggest adding ms.setFault(bool) too because if the message 
comes in via soap/http response as 500 then we know its a fault right away 
without having to crack the envelope at all.

> I will very likely be doing the same with send()/sendFault(), since I 
> believe there's a similar issue there.

OK with me.

Sanjiva Weerawarana, Ph.D.
Founder & Director; Lanka Software Foundation;
Founder, Chairman & CEO; WSO2, Inc.;
Director; Open Source Initiative;
Member; Apache Software Foundation;
Visiting Lecturer; University of Moratuwa;

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message