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 Glen Daniels <gl...@thoughtcraft.com> on 2007/05/10 21:10:26 UTC

[axis2] Heads-up - AxisEngine work

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.

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

Thanks,
--Glen

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


Re: [axis2] Heads-up - AxisEngine work

Posted by Glen Daniels <gl...@thoughtcraft.com>.
You bet.

--G

Paul Fremantle wrote:
> Glen
> 
> Can you please copy Synapse-dev as well on these notes.. we use a lot
> of core Axis2 engine code in our Axis2 environment.
> 
> Paul
> 
> On 5/10/07, Glen Daniels <gl...@thoughtcraft.com> 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.
>>
>> I will very likely be doing the same with send()/sendFault(), since I
>> believe there's a similar issue there.
>>
>> Thanks,
>> --Glen
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-dev-help@ws.apache.org
>>
>>
> 
> 

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


Re: [axis2] Heads-up - AxisEngine work

Posted by Paul Fremantle <pz...@gmail.com>.
Glen

Can you please copy Synapse-dev as well on these notes.. we use a lot
of core Axis2 engine code in our Axis2 environment.

Paul

On 5/10/07, Glen Daniels <gl...@thoughtcraft.com> 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.
>
> I will very likely be doing the same with send()/sendFault(), since I
> believe there's a similar issue there.
>
> Thanks,
> --Glen
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>


-- 
Paul Fremantle
VP/Technology, WSO2 and OASIS WS-RX TC Co-chair

http://bloglines.com/blog/paulfremantle
paul@wso2.com

"Oxygenating the Web Service Platform", www.wso2.com

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


Re: [axis2] Heads-up - AxisEngine work

Posted by Sanjiva Weerawarana <sa...@opensource.lk>.
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


Re: [axis2] Heads-up - AxisEngine work

Posted by Paul Fremantle <pz...@gmail.com>.
Glen

Can you please copy Synapse-dev as well on these notes.. we use a lot
of core Axis2 engine code in our Axis2 environment.

Paul

On 5/10/07, Glen Daniels <gl...@thoughtcraft.com> 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.
>
> I will very likely be doing the same with send()/sendFault(), since I
> believe there's a similar issue there.
>
> Thanks,
> --Glen
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>


-- 
Paul Fremantle
VP/Technology, WSO2 and OASIS WS-RX TC Co-chair

http://bloglines.com/blog/paulfremantle
paul@wso2.com

"Oxygenating the Web Service Platform", www.wso2.com

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