Hi Micheal,

>  what is the difference between these to methods of adding a policy?
>  
> service._getServiceClient().getAxisService().getPolicyInclude().addPolicyElement(PolicyInclude.SERVICE_POLICY,
>  rampConfigPolicy);

If you set the policy like this, it will add the assertions to the
existing policy. In your case, this is the correct approach as that is
what you want, add the RampartConfig Assertion to the existing policy.

>  
> service._getServiceClient().getServiceContext().getConfigurationContext().setProperty(RampartMessageData.KEY_RAMPART_POLICY,rampConfigPolicy);

If you set the policy like this, it will override the other policies
and Rampart will consider only the "KEY RAMPART POLICY". In your
scenario , this not the way to go. But when you load the complete
policy using a xml file, this approach can be used.

-- 
Nandana Mihindukulasooriya
WSO2 inc.

http://nandana83.blogspot.com/
http://nandanasm.wordpress.com/

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

Reply via email to