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/03/06 22:07:05 UTC

[axis2] Re: AxisEngine.checkMustUnderstand enforcing actor/roles?

Re-sending with [axis2] prefix.  Please make sure any replies continue 
on this thread if possible.  Thanks.

--G

-------- Original Message --------
Subject: Re: AxisEngine.checkMustUnderstand enforcing actor/roles?
Date: Tue, 06 Mar 2007 15:52:50 -0500
From: Glen Daniels <gl...@thoughtcraft.com>
Reply-To: axis-dev@ws.apache.org
To: axis-dev@ws.apache.org

Hi dims, Michael:

It is certainly true that role support is quite lacking so far in Axis2
- I'll commit to cleaning this all up over the next week or so.  The
main reason to differentiate the SOAP versions is to throw the correct
fault - I think Axis1 dealt a lot better in some ways with the different
SOAP versions (see org.apache.axis.soap.SOAPConstants), and we should
probably implement something similar for A2.  This lets you write clean
code and keep the version-specific stuff hidden underneath another class.

That said, the checkMustUnderstand() code is definitely doing the wrong
thing right now.  The correct logic should be:

for (each header that IS targeted to me) {
    if (!processed and mustUnderstand==true) {
        throw version-specific-MU-Fault
    }
}

The first cut of "is targeted to me" is something like "has no role, the
'next' role, or is the ultimate receiver role".  The next version is to
support a configurable list of role URIs.

Thanks for noticing this - clearly we need better tests here as well.
Deepal and I were focusing on the Phase concept for that checkin you
reference, and didn't pay enough attention to the MU piece.

--Glen

Davanum Srinivas wrote:
> Glen,
> 
> Could you please take a look at this one? Since Deepal is out and your
> name pops up in the original check-in :)
> 
> -- dims
> 
> On 3/5/07, Michael Rheinheimer <ro...@us.ibm.com> wrote:
>>
>>
>>
>> Hi, I have a few questions about the MustUnderstand SOAP header 
>> attribute processing logic in the AxisEngine.  Any help is 
>> appreciated.  What I see in the AxisEngine.checkMustUnderstand (at 
>> least up to SVN rev 512819) is that if the MustUnderstand header 
>> attribute is there, the following occurs:
>>
>>  (1)  if not SOAP 1.1, header must have a role block, and that role 
>> block must be NEXT
>>  (2)  if SOAP 1.1, header may be null, but if it is not, then it must 
>> be NEXT
>>
>>  I'm not sure why we would be doing this, except that possibly the 
>> support for the three standard roles is incomplete (SOAP 1.2, section 
>> 2.2:  
>> http://www.w3.org/TR/2003/REC-soap12-part1-20030624/#soaproles).  The 
>> comments in the method declare support for only NEXT.  If my searching 
>> is correct, it appears deepal committed the version with the comments:
>>
>>
>> 2005-12-11 svn commit: r355917 [1/3] - in /webservices/axis2/tru 
>> axis-dev deepal
>>  Anybody have any insight into this?  Any plans to support the other 
>> two roles?  Why is the logic different for !SOAP1.1 than for SOAP1.1?
>>
>>  Thanks!
>>  mike
>>
> 
> 
> 

---------------------------------------------------------------------
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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Re: [axis2] Re: AxisEngine.checkMustUnderstand enforcing actor/roles?

Posted by Glen Daniels <gl...@thoughtcraft.com>.
Got busy with a couple of other things, getting back to this next. 
Sorry for the delay!

--G

Michael Rheinheimer wrote:
> Thank you Glen for working on this.  Is the work complete?  What's the
> status?
> 
> mike
> 
> Mike Rheinheimer
> (512) 838-0086   t/l 678-0086
> WebSphere WebService Core Engine Team
> 
> 
> 
>                                                                            
>              Glen Daniels                                                  
>              <glen@thoughtcraf                                             
>              t.com>                                                     To 
>                                        Axis-Dev <ax...@ws.apache.org>,  
>              03/16/2007 11:24          synapse-dev@ws.apache.org           
>              AM                                                         cc 
>                                                                            
>                                                                    Subject 
>              Please respond to         Re: [axis2] Re:                     
>              axis-dev@ws.apach         AxisEngine.checkMustUnderstand      
>                    e.org               enforcing actor/roles?              
>                                                                            
>                                                                            
>                                                                            
>                                                                            
>                                                                            
>                                                                            
> 
> 
> 
> 
> Michael, dims, all:
> 
> The first piece of this is done, FYI.  Working on the second part this
> weekend.
> 
>> That said, the checkMustUnderstand() code is definitely doing the wrong
>> thing right now.  The correct logic should be:
>>
>> for (each header that IS targeted to me) {
>>    if (!processed and mustUnderstand==true) {
>>        throw version-specific-MU-Fault
>>    }
>> }
>>
>> The first cut of "is targeted to me" is something like "has no role, the
>> 'next' role, or is the ultimate receiver role".  The next version is to
>> support a configurable list of role URIs.
> 
> This first cut version is exactly what the engine now does (see
> AxisEngine).  I'm going to add a way to configure roles for a) the
> engine, b) services, and c) modules.  The roles that are active for a
> given MessageContext will be the union of all of those.  We will always
> default to supporting the ultimate receiver role, but I'll add config to
> turn this off as well (i.e. for Synapse).
> 
> --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] Re: AxisEngine.checkMustUnderstand enforcing actor/roles?

Posted by Glen Daniels <gl...@thoughtcraft.com>.
Got busy with a couple of other things, getting back to this next. 
Sorry for the delay!

--G

Michael Rheinheimer wrote:
> Thank you Glen for working on this.  Is the work complete?  What's the
> status?
> 
> mike
> 
> Mike Rheinheimer
> (512) 838-0086   t/l 678-0086
> WebSphere WebService Core Engine Team
> 
> 
> 
>                                                                            
>              Glen Daniels                                                  
>              <glen@thoughtcraf                                             
>              t.com>                                                     To 
>                                        Axis-Dev <ax...@ws.apache.org>,  
>              03/16/2007 11:24          synapse-dev@ws.apache.org           
>              AM                                                         cc 
>                                                                            
>                                                                    Subject 
>              Please respond to         Re: [axis2] Re:                     
>              axis-dev@ws.apach         AxisEngine.checkMustUnderstand      
>                    e.org               enforcing actor/roles?              
>                                                                            
>                                                                            
>                                                                            
>                                                                            
>                                                                            
>                                                                            
> 
> 
> 
> 
> Michael, dims, all:
> 
> The first piece of this is done, FYI.  Working on the second part this
> weekend.
> 
>> That said, the checkMustUnderstand() code is definitely doing the wrong
>> thing right now.  The correct logic should be:
>>
>> for (each header that IS targeted to me) {
>>    if (!processed and mustUnderstand==true) {
>>        throw version-specific-MU-Fault
>>    }
>> }
>>
>> The first cut of "is targeted to me" is something like "has no role, the
>> 'next' role, or is the ultimate receiver role".  The next version is to
>> support a configurable list of role URIs.
> 
> This first cut version is exactly what the engine now does (see
> AxisEngine).  I'm going to add a way to configure roles for a) the
> engine, b) services, and c) modules.  The roles that are active for a
> given MessageContext will be the union of all of those.  We will always
> default to supporting the ultimate receiver role, but I'll add config to
> turn this off as well (i.e. for Synapse).
> 
> --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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Re: [axis2] Re: AxisEngine.checkMustUnderstand enforcing actor/roles?

Posted by Michael Rheinheimer <ro...@us.ibm.com>.
Thank you Glen for working on this.  Is the work complete?  What's the
status?

mike

Mike Rheinheimer
(512) 838-0086   t/l 678-0086
WebSphere WebService Core Engine Team



                                                                           
             Glen Daniels                                                  
             <glen@thoughtcraf                                             
             t.com>                                                     To 
                                       Axis-Dev <ax...@ws.apache.org>,  
             03/16/2007 11:24          synapse-dev@ws.apache.org           
             AM                                                         cc 
                                                                           
                                                                   Subject 
             Please respond to         Re: [axis2] Re:                     
             axis-dev@ws.apach         AxisEngine.checkMustUnderstand      
                   e.org               enforcing actor/roles?              
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           




Michael, dims, all:

The first piece of this is done, FYI.  Working on the second part this
weekend.

> That said, the checkMustUnderstand() code is definitely doing the wrong
> thing right now.  The correct logic should be:
>
> for (each header that IS targeted to me) {
>    if (!processed and mustUnderstand==true) {
>        throw version-specific-MU-Fault
>    }
> }
>
> The first cut of "is targeted to me" is something like "has no role, the
> 'next' role, or is the ultimate receiver role".  The next version is to
> support a configurable list of role URIs.

This first cut version is exactly what the engine now does (see
AxisEngine).  I'm going to add a way to configure roles for a) the
engine, b) services, and c) modules.  The roles that are active for a
given MessageContext will be the union of all of those.  We will always
default to supporting the ultimate receiver role, but I'll add config to
turn this off as well (i.e. for Synapse).

--Glen

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


Re: [axis2] Re: AxisEngine.checkMustUnderstand enforcing actor/roles?

Posted by Glen Daniels <gl...@thoughtcraft.com>.
Michael, dims, all:

The first piece of this is done, FYI.  Working on the second part this 
weekend.

> That said, the checkMustUnderstand() code is definitely doing the wrong
> thing right now.  The correct logic should be:
> 
> for (each header that IS targeted to me) {
>    if (!processed and mustUnderstand==true) {
>        throw version-specific-MU-Fault
>    }
> }
> 
> The first cut of "is targeted to me" is something like "has no role, the
> 'next' role, or is the ultimate receiver role".  The next version is to
> support a configurable list of role URIs.

This first cut version is exactly what the engine now does (see 
AxisEngine).  I'm going to add a way to configure roles for a) the 
engine, b) services, and c) modules.  The roles that are active for a 
given MessageContext will be the union of all of those.  We will always 
default to supporting the ultimate receiver role, but I'll add config to 
turn this off as well (i.e. for Synapse).

--Glen

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


Re: [axis2] Re: AxisEngine.checkMustUnderstand enforcing actor/roles?

Posted by Glen Daniels <gl...@thoughtcraft.com>.
Michael, dims, all:

The first piece of this is done, FYI.  Working on the second part this 
weekend.

> That said, the checkMustUnderstand() code is definitely doing the wrong
> thing right now.  The correct logic should be:
> 
> for (each header that IS targeted to me) {
>    if (!processed and mustUnderstand==true) {
>        throw version-specific-MU-Fault
>    }
> }
> 
> The first cut of "is targeted to me" is something like "has no role, the
> 'next' role, or is the ultimate receiver role".  The next version is to
> support a configurable list of role URIs.

This first cut version is exactly what the engine now does (see 
AxisEngine).  I'm going to add a way to configure roles for a) the 
engine, b) services, and c) modules.  The roles that are active for a 
given MessageContext will be the union of all of those.  We will always 
default to supporting the ultimate receiver role, but I'll add config to 
turn this off as well (i.e. for Synapse).

--Glen

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