axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sanjiva Weerawarana <sanj...@opensource.lk>
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.

+1.

> 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.
-- 
Sanjiva Weerawarana, Ph.D.
Founder & Director; Lanka Software Foundation; http://www.opensource.lk/
Founder, Chairman & CEO; WSO2, Inc.; http://www.wso2.com/
Director; Open Source Initiative; http://www.opensource.org/
Member; Apache Software Foundation; http://www.apache.org/
Visiting Lecturer; University of Moratuwa; http://www.cse.mrt.ac.lk/

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


Mime
View raw message