Examples of PrimitiveAssertion


Examples of org.apache.cxf.ws.policy.builder.primitive.PrimitiveAssertion

    }
   
    @Test
    public void testCheck() throws PolicyException {
        QName aqn = new QName("http://x.y.z", "a");
        PolicyAssertion a = new PrimitiveAssertion(aqn);
        Collection<PolicyAssertion> assertions = new ArrayList<PolicyAssertion>();
        assertions.add(a);
        AssertionInfoMap aim = new AssertionInfoMap(assertions);
        try {
            aim.check();
View Full Code Here

Examples of org.apache.cxf.ws.policy.builder.primitive.PrimitiveAssertion

   
    @Test
    public void testAllAssertionsIn() {
       
        Policy nested = new Policy();
        PolicyAssertion nb = new PrimitiveAssertion(
            new QName("http://x.y.z", "b"));
        nested.addAssertion(nb);
       
        Policy p = new Policy();
        PolicyAssertion a1 = new PrimitiveAssertion(
                                new QName("http://x.y.z", "a"));
        PolicyAssertion a2 = new PrimitiveAssertion(
                                 new QName("http://x.y.z", "a"));
        PolicyAssertion b = new PrimitiveAssertion(
                                new QName("http://x.y.z", "b"));
        PolicyAssertion c = new NestedPrimitiveAssertion(
                               new QName("http://x.y.z", "c"), false, nested, true,
                               null);
       
View Full Code Here

Examples of org.apache.cxf.ws.policy.builder.primitive.PrimitiveAssertion

        if (isEntireHeadersAndBodySignatures()) {
            all.addPolicyComponent(new PrimitiveAssertion(SP12Constants.ONLY_SIGN_ENTIRE_HEADERS_AND_BODY));
        }
        */
        if (isIncludeTimestamp()) {
            all.addPolicyComponent(new PrimitiveAssertion(SP12Constants.INCLUDE_TIMESTAMP));
        }
        if (getLayout() != null) {
            all.addPolicyComponent(getLayout());
        }
        ea.addPolicyComponent(all);
View Full Code Here

Examples of org.apache.cxf.ws.policy.builder.primitive.PrimitiveAssertion

            NestedPrimitiveAssertion nap = new NestedPrimitiveAssertion(elem, builder);
            nap.setName(MetadataConstants.ADDRESSING_ASSERTION_QNAME);
            return nap;
        } else if (MetadataConstants.ANON_RESPONSES_ASSERTION_QNAME.equals(qn)
            || MetadataConstants.ANON_RESPONSES_ASSERTION_QNAME_0705.equals(qn)) {
            return new PrimitiveAssertion(MetadataConstants.ANON_RESPONSES_ASSERTION_QNAME,
                                          optional);
        } else if (MetadataConstants.NON_ANON_RESPONSES_ASSERTION_QNAME.getLocalPart()
            .equals(localName)
            || MetadataConstants.NON_ANON_RESPONSES_ASSERTION_QNAME_0705.getLocalPart()
                .equals(localName)) {
            return new PrimitiveAssertion(MetadataConstants.NON_ANON_RESPONSES_ASSERTION_QNAME,
                                          optional);
        }
        return null;
    }
View Full Code Here

Examples of org.apache.cxf.ws.policy.builder.primitive.PrimitiveAssertion

        assertSame(a, assertions.iterator().next());       
        control.verify();
       
        assertions.clear();
        Policy p = new Policy();
        a = new PrimitiveAssertion(new QName("http://x.y.z", "a"));
        p.addAssertion(a);
       
        // id has no #
        engine.getRegistry().register("ab", p);
       
View Full Code Here

Examples of org.apache.cxf.ws.policy.builder.primitive.PrimitiveAssertion

        if (attribute != null) {
            optional = Boolean.valueOf(attribute.getValue());
        }

        if (MetadataConstants.MTOM_ASSERTION_QNAME.equals(qn)) {
            return new PrimitiveAssertion(MetadataConstants.MTOM_ASSERTION_QNAME, optional);
        }

        return null;
    }
View Full Code Here

Examples of org.apache.cxf.ws.policy.builder.primitive.PrimitiveAssertion

        String local = "UsingAddressing";
        if ("http://www.w3.org/2005/08/addressing".equals(addressingNamespace)) {
            ns = "http://www.w3.org/2007/02/addressing/metadata";
            local = "Addressing";
        }
        return new PrimitiveAssertion(new QName(ns, local), true);
    }
View Full Code Here

Examples of org.apache.cxf.ws.policy.builder.primitive.PrimitiveAssertion

        assertSame(a, assertions.iterator().next());       
        control.verify();
       
        assertions.clear();
        Policy p = new Policy();
        a = new PrimitiveAssertion(new QName("http://x.y.z", "a"));
        p.addAssertion(a);
       
        // id has no #
        engine.getRegistry().register("ab", p);
       
View Full Code Here

Examples of org.apache.cxf.ws.policy.builder.primitive.PrimitiveAssertion

        requestSecurityToken(tok.getIssuerAddress(), action, "/Renew", tok);
    }

    private PrimitiveAssertion getAddressingAssertion() {
        String ns = "http://schemas.xmlsoap.org/ws/2004/08/addressing/policy";
        return new PrimitiveAssertion(new QName(ns, "UsingAddressing"));
    }
View Full Code Here

Examples of org.apache.cxf.ws.policy.builder.primitive.PrimitiveAssertion

        requestSecurityToken(tok.getIssuerAddress(), action, "/Renew", tok);
    }

    private PrimitiveAssertion getAddressingAssertion() {
        String ns = "http://schemas.xmlsoap.org/ws/2004/08/addressing/policy";
        return new PrimitiveAssertion(new QName(ns, "UsingAddressing"));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.