Package org.apache.neethi.builders.xml

Examples of org.apache.neethi.builders.xml.XMLPrimitiveAssertionBuilder


            QName[] knownElements = builder.getKnownElements();
            for (int i = 0; i < knownElements.length; i++) {
                registeredBuilders.put(knownElements[i], builder);
            }
        }
        defaultBuilder = new XMLPrimitiveAssertionBuilder();
    }
View Full Code Here


    public void testPrimitiveBuilder() throws Exception {
        String text = "<ns1:MaximumRetransmissionCount FooAtt=\"blah\" xmlns:ns1=\"http://foo\">10"
            + "</ns1:MaximumRetransmissionCount>";
       
       
        Assertion as = new XMLPrimitiveAssertionBuilder().build(getElementFromString(text),
                                                                policyEngine.getAssertionBuilderFactory());
        assertNotNull(as);
        PrimitiveAssertion pas = (PrimitiveAssertion)as;
        assertEquals("10", pas.getTextValue());
        assertEquals("blah", pas.getAttribute(new QName("FooAtt")));
View Full Code Here

                      + "<sp:MustSupportRefThumbprint/>"
                      + "<sp:MustSupportRefEncryptedKey/>"
                      + "</wsp:Policy></sp:Wss11>";
                                                                                       

        Assertion as = new XMLPrimitiveAssertionBuilder().build(getElementFromString(text),
                                                                policyEngine.getAssertionBuilderFactory());
        assertNotNull(as);
       
       
        StringWriter writer = new StringWriter();
View Full Code Here

            + "<sp:Body />"
            + "<sp:Header Name=\"To\" Namespace=\"http://schemas.xmlsoap.org/ws/2004/08/addressing\"/>"
            + "<sp:Header Name=\"From\" Namespace=\"http://schemas.xmlsoap.org/ws/2004/08/addressing\" />"
            + "</sp:SignedParts>";

        Assertion as = new XMLPrimitiveAssertionBuilder().build(getElementFromString(text),
                                                                policyEngine.getAssertionBuilderFactory());
        assertNotNull(as);
       
       
        StringWriter writer = new StringWriter();
View Full Code Here

            if (!alreadyWarned) {
                ignored.add(qname);
                Message m = new Message("NO_ASSERTIONBUILDER_EXC", BUNDLE, qname.toString());
                LOG.warning(m.toString());
            }
            return new XMLPrimitiveAssertionBuilder();
        } else {
            Message m = new Message("NO_ASSERTIONBUILDER_EXC", BUNDLE, qname.toString());
            throw new PolicyException(m);
        }
    }
View Full Code Here

        if (attribute != null) {
            optional = Boolean.valueOf(attribute.getValue());
        }
        if (MetadataConstants.ADDRESSING_ASSERTION_QNAME.equals(qn)
            || MetadataConstants.ADDRESSING_ASSERTION_QNAME_0705.equals(qn)) {
            Assertion nap = new XMLPrimitiveAssertionBuilder() {
                public Assertion newPrimitiveAssertion(Element element, Map<QName, String> mp) {
                    return new PrimitiveAssertion(MetadataConstants.ADDRESSING_ASSERTION_QNAME,
                                                  isOptional(element), isIgnorable(element), mp);       
                }
                public Assertion newPolicyContainingAssertion(Element element,
View Full Code Here

    public void testPrimitiveBuilder() throws Exception {
        String text = "<ns1:MaximumRetransmissionCount FooAtt=\"blah\" xmlns:ns1=\"http://foo\">10"
            + "</ns1:MaximumRetransmissionCount>";
       
       
        Assertion as = new XMLPrimitiveAssertionBuilder().build(getElementFromString(text),
                                                                policyEngine.getAssertionBuilderFactory());
        assertNotNull(as);
        PrimitiveAssertion pas = (PrimitiveAssertion)as;
        assertEquals("10", pas.getTextValue());
        assertEquals("blah", pas.getAttribute(new QName("FooAtt")));
View Full Code Here

                      + "<sp:MustSupportRefThumbprint/>"
                      + "<sp:MustSupportRefEncryptedKey/>"
                      + "</wsp:Policy></sp:Wss11>";
                                                                                       

        Assertion as = new XMLPrimitiveAssertionBuilder().build(getElementFromString(text),
                                                                policyEngine.getAssertionBuilderFactory());
        assertNotNull(as);
       
       
        StringWriter writer = new StringWriter();
View Full Code Here

            + "<sp:Body />"
            + "<sp:Header Name=\"To\" Namespace=\"http://schemas.xmlsoap.org/ws/2004/08/addressing\"/>"
            + "<sp:Header Name=\"From\" Namespace=\"http://schemas.xmlsoap.org/ws/2004/08/addressing\" />"
            + "</sp:SignedParts>";

        Assertion as = new XMLPrimitiveAssertionBuilder().build(getElementFromString(text),
                                                                policyEngine.getAssertionBuilderFactory());
        assertNotNull(as);
       
       
        StringWriter writer = new StringWriter();
View Full Code Here

            QName[] knownElements = builder.getKnownElements();
            for (int i = 0; i < knownElements.length; i++) {
                registeredBuilders.put(knownElements[i], builder);
            }
        }
        defaultBuilder = new XMLPrimitiveAssertionBuilder();
    }
View Full Code Here

TOP

Related Classes of org.apache.neethi.builders.xml.XMLPrimitiveAssertionBuilder

Copyright © 2018 www.massapicom. 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.