You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rampart-dev@ws.apache.org by Christian Mielke <cm...@nc-ag.de> on 2007/12/11 09:17:29 UTC
Where to find Rampart Configuration during Runtime
Hello!
I want to write a handler which needs the RAMPART configuration during runtime. Where can I find the defined parameters? Are they in the message context?
Greetings
Chris
Re: Where to find Rampart Configuration during Runtime
Posted by Nandana Mihindukulasooriya <na...@gmail.com>.
Hi,
If you are using the policy based configuration, Rampart configuration is
in the service policy as a RampartConfig assertion. You will have to
take it from the policy.
if(msgCtx.getProperty(KEY_RAMPART_POLICY) != null) {
this.servicePolicy =
(Policy)msgCtx.getProperty(KEY_RAMPART_POLICY);
}
or
Parameter param = msgCtx.getParameter(
RampartMessageData.KEY_RAMPART_POLICY);
if(param != null) {
OMElement policyElem = param.getParameterElement
().getFirstElement();
this.servicePolicy = PolicyEngine.getPolicy(policyElem);
}
Thanks,
Nandana
On Dec 11, 2007 1:47 PM, Christian Mielke <cm...@nc-ag.de> wrote:
> Hello!
>
> I want to write a handler which needs the RAMPART configuration during
> runtime. Where can I find the defined parameters? Are they in the message
> context?
>
> Greetings
> Chris
>