[ 
https://issues.apache.org/jira/browse/AXIS2-4435?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12885891#action_12885891
 ] 

Detelin Yordanov commented on AXIS2-4435:
-----------------------------------------

It seems that applyPolicy () works only if called on AxisService -> 
AxisOperation -> AxisMessage level.

Calling this method on AxisEndpoint -> AxisBinding -> AxisBindingOperation -> 
AxisBindingMessage hierarchy does nothing.
The effective policy will NOT be calcualted and corresponding modules will NOT 
be engaged :(

One additional flaw of this method is that even if you call it on the former 
hierarchy, it will engage the modules on AxisMessage.

So for example, if having a policy on one of the Ports / Bindings, calling 
applyPolicy() on AxisService / AxisOperation / AxisMessage, will engage the 
modules to the AxisMessage, so they will be engaged for all invokations, even 
the ones that use different Port / Binding (without any policy) !

I think that's really bad and needs to be fixed, I cannot imagine why nobody 
else seem to have noticed it.


> Applying policy does not engage module
> --------------------------------------
>
>                 Key: AXIS2-4435
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4435
>             Project: Axis2
>          Issue Type: Bug
>          Components: client-api
>    Affects Versions: 1.5
>            Reporter: Dennis Sosnoski
>
> The org.apache.axis2.description.AxisDescription JavaDocs say "This method 
> sets the policy as the default of this AxisDescription instance. Further more 
> this method does the followings.
> (1) Engage whatever modules necessary to execute new the effective policy of 
> this AxisDescription instance. (2) Disengage whatever modules that are not 
> necessary to execute the new effective policy of this AxisDescription 
> instance. (3) Check whether each module can execute the new effective policy 
> of this AxisDescription instance. (4) If not throw an AxisFault to notify the 
> user. (5) Else notify each module about the new effective policy."
> This does not appear to work, at least not when WS-SecurityPolicy is used. 
> Even after setting the policy on an AxisOperation (directly, or by way of a 
> client stub generated from a WSDL containing a WS-SecurityPolicy) you still 
> need to call engageModule("rampart") on the ServiceClient - otherwise the 
> policy is ignored.

-- 
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