[ 
https://issues.apache.org/jira/browse/AXIS2-4162?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Detelin Yordanov updated AXIS2-4162:
------------------------------------

    Attachment: patch.txt

I'm providing the following patch as a fix for this. 
The workaround is to override the applyPolicy() method for AxisEndpoint, 
AxisBinding, AxisBindingOperation and AxisBindingMessage and call the same 
method on the referenced AxisServicem, AxisOperation or AxisMessage.

However, I think that the best solution is to fix this is to refactor the 
module engagement so that the module is not always engaged on the 
AxisBindingMessage, but on the AxisDescription instance that contains the 
according policy.
For example if we have a security policy on AxisBinding, we should add the 
rampart module to the "engagedModules"
list in AxisBinding. Then the MessageContext.isEnagaged(String) should be 
modified
to look at each AxisDescription instance in the hierarchy (including the 
"binding"-specific AxisDescription instances).

> AxisDescription.applyPolicy() fails to engage any neccessary modules if 
> called on AxisBinding/AxisEndpoint
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-4162
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4162
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.4.1, 1.4, nightly
>            Reporter: Detelin Yordanov
>         Attachments: patch.txt
>
>
> Hi guys,
>    I have been using the applyPolicy() method to automatically engage any 
> modules required for the current policy.  Nandana pointed me out that this is 
> also being used in ADB generated client and I expected it to work properly 
> any AxisDescription instance.
> However I noticed that if calling this method on AxisEndpoint and AxisBinding 
> nothing happens - the policy is there but the modules do not get engaged.
> It seems that the reason for this is that the applyPolicy() iterates over the 
> children of the current AxisDescription till it reaches the AxisMessage, then 
> goes up the hierarchy collecting the effective policy.
> This works fine when called on any AxisDescription in the AxisService -> 
> AxisOperation(s) -> AxisMessage(s) hierarchy, but if it is called on the
> AxisEndpoint it does not go further below since the AxisBinding is not added 
> as a child to the AxisEndpoint.
> Furthermore even if it was able to go down and reach any potential 
> AxisBindingMessages in the 
> AxisEndpoint -> AxisBinding -> AxisBindingOperation -> AxisBindingMessage 
> hierarchy it would not be able to compute the effective policy since the 
> getApplicablePolicy(AxisDescription) method is working only on an AxisMessage 
> instance.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to