You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by Saminda Abeyruwan <sa...@gmail.com> on 2006/07/12 08:29:41 UTC

AxisEngine#receive() ; checkMustUnderstand();

Hi Devs,

AxisEngine#receiver()  always check for must understand header before
invoking the relevant message receiver. This would really give a hard time
in Synapse when we tried to implement qos support such as RM ect.

Synapse has its own SynapseMessageReceiver(SMR) and SynapseDispatcher and
all the messages will be passed to this message receiver via
SynapseDispatcher. During this first phase we are not apply any QOS. All QOS
handles through mediators. Ex: RM will handles through RMMediator(RMM).
RMMediator is a part of Synapse. We use these mediators to engage Axis2
modules hence supporting QOS.

So in the case of RM all control messages and application messages will be
passed to RMM. Now if a messages comes with must understand true, it will
not pass to SMR at the first phase, because Axis2 engine check for must
understand and it will throw an exception.

Intermediaries like Synapse would not need to understand must understand
headers and it should be upto the Service endpoint to understand it.

So IMHO, in order to user AxisEngine in SynapseEnvironment, we need a switch
to configure must understanding.


Thank you

Saminda

Re: AxisEngine#receive() ; checkMustUnderstand();

Posted by Sanjiva Weerawarana <sa...@opensource.lk>.
I didn't follow this entire thread but I think there's a missing bit.
Axis2 must do must understand processing ONLY on headers that are
without a role (or node or actor or whatever that is called; u know what
I mean) or for *specific roles* that the Axis2 engine has been told its
in. Usually the role is the default "ultimate receiver" role and nothing
else. So if there are headers targeted for role A and the engine is not
in that role, it MUST ignore those headers even if those carry
@mustUnderstand.

So I agree we mustn't bypass mustunderstand processing in Axis2, but we
must make sure Axis2 is well-behaved to only cry about stuff its spsed
to cry about. Sorry if I'm stating the obvious but it wasn't clear to me
in the email below.

Sanjiva.

On Thu, 2006-07-13 at 20:40 +0530, Eran Chinthaka wrote:
> Paul Fremantle wrote:
> > I don't know enough about the mustUnderstand handling in Axis2, but it
> > seems to me that we might also want to identify a Synapse instance as
> > a given role.
> > 
> > In other words, if we are acting as an intermediary, we may be
> > implementing a specific role, and not the "ultimate receiver". So we
> > only need to understand the headers that are targeted at our role or
> > the "next" role.
> 
> Well I don't think Synapse can understand all the headers which has the
> Role next.
> Take this example. A sends a message to B and this message is mediated
> by Synapse (S). If A doesn't know about S, then he sends some headers,
> marked as mustUnderstand=true thinking B will understand them all.
> 
> A ------ (S) ----- B
> 
> But if S intercept this message and if S can not understand it, then
> Synapse engine is in trouble.
> 
> So there are two basic solutions to this problem.
> 
> 1. To hack Axis2 itself to bypass mustUnderstand processing. This is
> very bad, IMO. Axis2 is a SOAP processor and it MUST adhere to the
> basics of SOAP.
> 
> 2. As Saminda suggested, mark all the headers as processed. This is how
> mustUnderstand processing work in Axis2. If a handler can understand a
> header, then it should set a header as processed. At the end of the
> chain, Axis2 engine gets all the headers which mustUnderstand=true, and
> checks whether all of them have the processed flag set. If even one
> fails its a mustUnderstand check error (See AxisEngine.java:80)
> So what Synapse can do is set all the headers as processed, before Axis2
> engine does the mustUnderstand checking.
> 
> I think thats what Saminda had proposed and I also +1 that.
> 
> -- Chinthaka
> 


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


Re: AxisEngine#receive() ; checkMustUnderstand();

Posted by Sanjiva Weerawarana <sa...@opensource.lk>.
On Wed, 2006-07-19 at 00:36 +0100, Paul Fremantle wrote:
> So we need Axis2 to be configurable to say which role an engine or
> module is implementing. Then Synapse can only have to process the
> mustUnderstands targeted at the role it is playing.

Can you please start a thread on axis-dev on this or open a JIRA? I
remember some old conversation about this but don't remember what
exactly was done. I'm sure someone else will recall!

Sanjiva.


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


Re: AxisEngine#receive() ; checkMustUnderstand();

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

The specific role "next" means that in the case you outline, Synapse must fault.

the roles defined by SOAP are:

next 	"http://www.w3.org/2003/05/soap-envelope/role/next" 	
Each SOAP intermediary and the ultimate SOAP receiver MUST act in this role.

none 	"http://www.w3.org/2003/05/soap-envelope/role/none" 	
SOAP nodes MUST NOT act in this role.

ultimateReceiver
	"http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver"
The ultimate receiver MUST act in this role.

[see http://www.w3.org/TR/soap12-part1/#soaproles]

As Sanjiva points out, if there is no role defined, then only the
ultimate receiver needs to understand that.

So we need Axis2 to be configurable to say which role an engine or
module is implementing. Then Synapse can only have to process the
mustUnderstands targeted at the role it is playing.

Paul

On 7/13/06, Eran Chinthaka <ch...@opensource.lk> wrote:
> Paul Fremantle wrote:
> > I don't know enough about the mustUnderstand handling in Axis2, but it
> > seems to me that we might also want to identify a Synapse instance as
> > a given role.
> >
> > In other words, if we are acting as an intermediary, we may be
> > implementing a specific role, and not the "ultimate receiver". So we
> > only need to understand the headers that are targeted at our role or
> > the "next" role.
>
> Well I don't think Synapse can understand all the headers which has the
> Role next.
> Take this example. A sends a message to B and this message is mediated
> by Synapse (S). If A doesn't know about S, then he sends some headers,
> marked as mustUnderstand=true thinking B will understand them all.
>
> A ------ (S) ----- B
>
> But if S intercept this message and if S can not understand it, then
> Synapse engine is in trouble.
>
> So there are two basic solutions to this problem.
>
> 1. To hack Axis2 itself to bypass mustUnderstand processing. This is
> very bad, IMO. Axis2 is a SOAP processor and it MUST adhere to the
> basics of SOAP.
>
> 2. As Saminda suggested, mark all the headers as processed. This is how
> mustUnderstand processing work in Axis2. If a handler can understand a
> header, then it should set a header as processed. At the end of the
> chain, Axis2 engine gets all the headers which mustUnderstand=true, and
> checks whether all of them have the processed flag set. If even one
> fails its a mustUnderstand check error (See AxisEngine.java:80)
> So what Synapse can do is set all the headers as processed, before Axis2
> engine does the mustUnderstand checking.
>
> I think thats what Saminda had proposed and I also +1 that.
>
> -- Chinthaka
>
>
>
>


-- 
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: AxisEngine#receive() ; checkMustUnderstand();

Posted by Eran Chinthaka <ch...@opensource.lk>.
Paul Fremantle wrote:
> I don't know enough about the mustUnderstand handling in Axis2, but it
> seems to me that we might also want to identify a Synapse instance as
> a given role.
> 
> In other words, if we are acting as an intermediary, we may be
> implementing a specific role, and not the "ultimate receiver". So we
> only need to understand the headers that are targeted at our role or
> the "next" role.

Well I don't think Synapse can understand all the headers which has the
Role next.
Take this example. A sends a message to B and this message is mediated
by Synapse (S). If A doesn't know about S, then he sends some headers,
marked as mustUnderstand=true thinking B will understand them all.

A ------ (S) ----- B

But if S intercept this message and if S can not understand it, then
Synapse engine is in trouble.

So there are two basic solutions to this problem.

1. To hack Axis2 itself to bypass mustUnderstand processing. This is
very bad, IMO. Axis2 is a SOAP processor and it MUST adhere to the
basics of SOAP.

2. As Saminda suggested, mark all the headers as processed. This is how
mustUnderstand processing work in Axis2. If a handler can understand a
header, then it should set a header as processed. At the end of the
chain, Axis2 engine gets all the headers which mustUnderstand=true, and
checks whether all of them have the processed flag set. If even one
fails its a mustUnderstand check error (See AxisEngine.java:80)
So what Synapse can do is set all the headers as processed, before Axis2
engine does the mustUnderstand checking.

I think thats what Saminda had proposed and I also +1 that.

-- Chinthaka


Re: AxisEngine#receive() ; checkMustUnderstand();

Posted by Saminda Abeyruwan <sa...@gmail.com>.
Hi Devs,

 Axis2 folks have proposed the following solution.

Synapse ships as a .MAR. So it has the control of the first Axis2 chain. So
having a Handler in the last phase of this chain to get mustunderstand
header and set it as processed, would make all messages to pass to
SynapseMessageReceiver. This would be hold for the Gateway model as well.

Your consensus on this would greatly appreciated.

Thank you

Saminda

On 7/13/06, Saminda Abeyruwan <sa...@gmail.com> wrote:
>
> I Agreed with you.
>
> As Paul proposed while back, QOS like RM/Sec handles in a mediator. An
> AxisEngine is newed in this mediator and pass all messages to it.
>
> Synapse execution happens in a MessageReceiver, which is the end of Axis2
> execution chain. In order to get messages to this MR, according to the
> current AxisEngine#receive(), this message should pass the must understand
> check of the first chain. In this context, if a message comes with must
> understand would not reach SynapseMessageReceiver at the first place,
> because we are not applying any qos at this chain. So the problem lies with
> the first Axis2 chain until SynapseMessageReceiver.
>
> IMHO, if a Synapse has to have a role or next to it, it should be checked
> in the SynapseEnvironment before that message injected in to the system to
> be mediated.  In either case, first of all IMO the message should come into
> SynapseEnvironment.
>
> Thank you
>
> Saminda
>
>
> On 7/13/06, Deepal jayasinghe <de...@gmail.com> wrote:
> >
> > I totally agree with Paul , in this case Synapse is acting as SOAP node
> > (intermediate SOAP node)
> >
> > Paul Fremantle wrote:
> >
> > > I don't know enough about the mustUnderstand handling in Axis2, but it
> > > seems to me that we might also want to identify a Synapse instance as
> > > a given role.
> > >
> > > In other words, if we are acting as an intermediary, we may be
> > > implementing a specific role, and not the "ultimate receiver". So we
> > > only need to understand the headers that are targeted at our role or
> > > the "next" role.
> > >
> > > Paul
> > >
> > > On 7/12/06, Asankha C. Perera <as...@wso2.com> wrote:
> > >
> > >> Saminda
> > >>
> > >> Yes.. you are right, we need to be able to ask Axis2 to not validate
> > >> mustunderstand headers.. we should get them to introduce a property
> > for
> > >> this and use it..
> > >>
> > >> asankha
> > >>
> > >> Saminda Abeyruwan wrote:
> > >> > Hi Devs,
> > >> >
> > >> > AxisEngine#receiver()  always check for must understand header
> > before
> > >> > invoking the relevant message receiver. This would really give a
> > hard
> > >> > time in Synapse when we tried to implement qos support such as RM
> > ect.
> > >> >
> > >> > Synapse has its own SynapseMessageReceiver(SMR) and
> > SynapseDispatcher
> > >> > and all the messages will be passed to this message receiver via
> > >> > SynapseDispatcher. During this first phase we are not apply any
> > QOS.
> > >> > All QOS handles through mediators. Ex: RM will handles through
> > >> > RMMediator(RMM). RMMediator is a part of Synapse. We use these
> > >> > mediators to engage Axis2 modules hence supporting QOS.
> > >> >
> > >> > So in the case of RM all control messages and application messages
> > >> > will be  passed to RMM. Now if a messages comes with must
> > understand
> > >> > true, it will not pass to SMR at the first phase, because Axis2
> > engine
> > >> > check for must understand and it will throw an exception.
> > >> >
> > >> > Intermediaries like Synapse would not need to understand must
> > >> > understand headers and it should be upto the Service endpoint to
> > >> > understand it.
> > >> >
> > >> > So IMHO, in order to user AxisEngine in SynapseEnvironment, we need
> > a
> > >> > switch to configure must understanding.
> > >> >
> > >> >
> > >> > Thank you
> > >> >
> > >> > Saminda
> > >> >
> > >>
> > >>
> > >> ---------------------------------------------------------------------
> > >> To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
> > >> For additional commands, e-mail: synapse-dev-help@ws.apache.org
> > >>
> > >>
> > >
> > >
> >
> >
> > --
> > Thanks,
> > Deepal
> > ................................................................
> > ~Future is Open~
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
> > For additional commands, e-mail: synapse-dev-help@ws.apache.org
> >
> >
>

Re: AxisEngine#receive() ; checkMustUnderstand();

Posted by Saminda Abeyruwan <sa...@gmail.com>.
I Agreed with you.

As Paul proposed while back, QOS like RM/Sec handles in a mediator. An
AxisEngine is newed in this mediator and pass all messages to it.

Synapse execution happens in a MessageReceiver, which is the end of Axis2
execution chain. In order to get messages to this MR, according to the
current AxisEngine#receive(), this message should pass the must understand
check of the first chain. In this context, if a message comes with must
understand would not reach SynapseMessageReceiver at the first place,
because we are not applying any qos at this chain. So the problem lies with
the first Axis2 chain until SynapseMessageReceiver.

IMHO, if a Synapse has to have a role or next to it, it should be checked in
the SynapseEnvironment before that message injected in to the system to be
mediated.  In either case, first of all IMO the message should come into
SynapseEnvironment.

Thank you

Saminda

On 7/13/06, Deepal jayasinghe <de...@gmail.com> wrote:
>
> I totally agree with Paul , in this case Synapse is acting as SOAP node
> (intermediate SOAP node)
>
> Paul Fremantle wrote:
>
> > I don't know enough about the mustUnderstand handling in Axis2, but it
> > seems to me that we might also want to identify a Synapse instance as
> > a given role.
> >
> > In other words, if we are acting as an intermediary, we may be
> > implementing a specific role, and not the "ultimate receiver". So we
> > only need to understand the headers that are targeted at our role or
> > the "next" role.
> >
> > Paul
> >
> > On 7/12/06, Asankha C. Perera <as...@wso2.com> wrote:
> >
> >> Saminda
> >>
> >> Yes.. you are right, we need to be able to ask Axis2 to not validate
> >> mustunderstand headers.. we should get them to introduce a property for
> >> this and use it..
> >>
> >> asankha
> >>
> >> Saminda Abeyruwan wrote:
> >> > Hi Devs,
> >> >
> >> > AxisEngine#receiver()  always check for must understand header before
> >> > invoking the relevant message receiver. This would really give a hard
> >> > time in Synapse when we tried to implement qos support such as RM
> ect.
> >> >
> >> > Synapse has its own SynapseMessageReceiver(SMR) and SynapseDispatcher
> >> > and all the messages will be passed to this message receiver via
> >> > SynapseDispatcher. During this first phase we are not apply any QOS.
> >> > All QOS handles through mediators. Ex: RM will handles through
> >> > RMMediator(RMM). RMMediator is a part of Synapse. We use these
> >> > mediators to engage Axis2 modules hence supporting QOS.
> >> >
> >> > So in the case of RM all control messages and application messages
> >> > will be  passed to RMM. Now if a messages comes with must understand
> >> > true, it will not pass to SMR at the first phase, because Axis2
> engine
> >> > check for must understand and it will throw an exception.
> >> >
> >> > Intermediaries like Synapse would not need to understand must
> >> > understand headers and it should be upto the Service endpoint to
> >> > understand it.
> >> >
> >> > So IMHO, in order to user AxisEngine in SynapseEnvironment, we need a
> >> > switch to configure must understanding.
> >> >
> >> >
> >> > Thank you
> >> >
> >> > Saminda
> >> >
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
> >> For additional commands, e-mail: synapse-dev-help@ws.apache.org
> >>
> >>
> >
> >
>
>
> --
> Thanks,
> Deepal
> ................................................................
> ~Future is Open~
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: synapse-dev-help@ws.apache.org
>
>

Re: AxisEngine#receive() ; checkMustUnderstand();

Posted by Deepal jayasinghe <de...@gmail.com>.
I totally agree with Paul , in this case Synapse is acting as SOAP node
(intermediate SOAP node)

Paul Fremantle wrote:

> I don't know enough about the mustUnderstand handling in Axis2, but it
> seems to me that we might also want to identify a Synapse instance as
> a given role.
>
> In other words, if we are acting as an intermediary, we may be
> implementing a specific role, and not the "ultimate receiver". So we
> only need to understand the headers that are targeted at our role or
> the "next" role.
>
> Paul
>
> On 7/12/06, Asankha C. Perera <as...@wso2.com> wrote:
>
>> Saminda
>>
>> Yes.. you are right, we need to be able to ask Axis2 to not validate
>> mustunderstand headers.. we should get them to introduce a property for
>> this and use it..
>>
>> asankha
>>
>> Saminda Abeyruwan wrote:
>> > Hi Devs,
>> >
>> > AxisEngine#receiver()  always check for must understand header before
>> > invoking the relevant message receiver. This would really give a hard
>> > time in Synapse when we tried to implement qos support such as RM ect.
>> >
>> > Synapse has its own SynapseMessageReceiver(SMR) and SynapseDispatcher
>> > and all the messages will be passed to this message receiver via
>> > SynapseDispatcher. During this first phase we are not apply any QOS.
>> > All QOS handles through mediators. Ex: RM will handles through
>> > RMMediator(RMM). RMMediator is a part of Synapse. We use these
>> > mediators to engage Axis2 modules hence supporting QOS.
>> >
>> > So in the case of RM all control messages and application messages
>> > will be  passed to RMM. Now if a messages comes with must understand
>> > true, it will not pass to SMR at the first phase, because Axis2 engine
>> > check for must understand and it will throw an exception.
>> >
>> > Intermediaries like Synapse would not need to understand must
>> > understand headers and it should be upto the Service endpoint to
>> > understand it.
>> >
>> > So IMHO, in order to user AxisEngine in SynapseEnvironment, we need a
>> > switch to configure must understanding.
>> >
>> >
>> > Thank you
>> >
>> > Saminda
>> >
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
>> For additional commands, e-mail: synapse-dev-help@ws.apache.org
>>
>>
>
>


-- 
Thanks,
Deepal
................................................................
~Future is Open~ 


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


Re: AxisEngine#receive() ; checkMustUnderstand();

Posted by Paul Fremantle <pz...@gmail.com>.
I don't know enough about the mustUnderstand handling in Axis2, but it
seems to me that we might also want to identify a Synapse instance as
a given role.

In other words, if we are acting as an intermediary, we may be
implementing a specific role, and not the "ultimate receiver". So we
only need to understand the headers that are targeted at our role or
the "next" role.

Paul

On 7/12/06, Asankha C. Perera <as...@wso2.com> wrote:
> Saminda
>
> Yes.. you are right, we need to be able to ask Axis2 to not validate
> mustunderstand headers.. we should get them to introduce a property for
> this and use it..
>
> asankha
>
> Saminda Abeyruwan wrote:
> > Hi Devs,
> >
> > AxisEngine#receiver()  always check for must understand header before
> > invoking the relevant message receiver. This would really give a hard
> > time in Synapse when we tried to implement qos support such as RM ect.
> >
> > Synapse has its own SynapseMessageReceiver(SMR) and SynapseDispatcher
> > and all the messages will be passed to this message receiver via
> > SynapseDispatcher. During this first phase we are not apply any QOS.
> > All QOS handles through mediators. Ex: RM will handles through
> > RMMediator(RMM). RMMediator is a part of Synapse. We use these
> > mediators to engage Axis2 modules hence supporting QOS.
> >
> > So in the case of RM all control messages and application messages
> > will be  passed to RMM. Now if a messages comes with must understand
> > true, it will not pass to SMR at the first phase, because Axis2 engine
> > check for must understand and it will throw an exception.
> >
> > Intermediaries like Synapse would not need to understand must
> > understand headers and it should be upto the Service endpoint to
> > understand it.
> >
> > So IMHO, in order to user AxisEngine in SynapseEnvironment, we need a
> > switch to configure must understanding.
> >
> >
> > Thank you
> >
> > Saminda
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: synapse-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: AxisEngine#receive() ; checkMustUnderstand();

Posted by "Asankha C. Perera" <as...@wso2.com>.
Saminda

Yes.. you are right, we need to be able to ask Axis2 to not validate 
mustunderstand headers.. we should get them to introduce a property for 
this and use it..

asankha

Saminda Abeyruwan wrote:
> Hi Devs,
>
> AxisEngine#receiver()  always check for must understand header before 
> invoking the relevant message receiver. This would really give a hard 
> time in Synapse when we tried to implement qos support such as RM ect.
>
> Synapse has its own SynapseMessageReceiver(SMR) and SynapseDispatcher 
> and all the messages will be passed to this message receiver via 
> SynapseDispatcher. During this first phase we are not apply any QOS. 
> All QOS handles through mediators. Ex: RM will handles through 
> RMMediator(RMM). RMMediator is a part of Synapse. We use these 
> mediators to engage Axis2 modules hence supporting QOS.
>
> So in the case of RM all control messages and application messages 
> will be  passed to RMM. Now if a messages comes with must understand 
> true, it will not pass to SMR at the first phase, because Axis2 engine 
> check for must understand and it will throw an exception.
>
> Intermediaries like Synapse would not need to understand must 
> understand headers and it should be upto the Service endpoint to 
> understand it.
>
> So IMHO, in order to user AxisEngine in SynapseEnvironment, we need a 
> switch to configure must understanding.
>
>
> Thank you
>
> Saminda   
>


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