Hi all,

WSS4J 2.0's policy model parses any child policies into Neethi policies.
For example, the Layout class is a PolicyContainingAssertion with a child
Policy that could be "Lax", "Strict", etc.

I'm running into a problem about how to mark these policies as asserted in
CXF, as there does not seem to be a corresponding "Assertion" for these
policies. For example, I can get the Layout object from the binding via:

Layout layout = binding.getLayout();

If I want to assert the child policy, I have no way of doing it beyond
something like:

assertPolicy(aim, SP12Constants.LAXTSFIRST);

protected boolean assertPolicy(AssertionInfoMap aim, QName q) {
        Collection<AssertionInfo> ais = aim.get(q);
        if (ais != null && !ais.isEmpty()) {
            for (AssertionInfo ai : ais) {
                ai.setAsserted(true);
            }
            return true;
        }
        return false;
    }

Obviously this is not good for policy alternatives. How can I just assert
the policy child element?

Colm.

-- 
Colm O hEigeartaigh

Talend Community Coder
http://coders.talend.com

Reply via email to