Examples of XmlPrimitiveAssertion


Examples of org.apache.cxf.ws.policy.builder.xml.XmlPrimitiveAssertion

                }
                ignored.add(0, qname);
                if (!alreadyWarned) {
                    LOG.warning(m.toString());
                }
                return new XmlPrimitiveAssertion(element);
            } else {
                throw new PolicyException(m);
            }
        }
View Full Code Here

Examples of org.apache.cxf.ws.policy.builder.xml.XmlPrimitiveAssertion

                }
                ignored.add(0, qname);
                if (!alreadyWarned) {
                    LOG.warning(m.toString());
                }
                return new XmlPrimitiveAssertion(element);
            } else {
                throw new PolicyException(m);
            }
        }
View Full Code Here

Examples of org.apache.cxf.ws.policy.builder.xml.XmlPrimitiveAssertion

     * @param parent the https token, that is to be populated with retrieved data.
     */
    private void processAlternative(List assertions, HttpsToken parent) {
       
        for (Iterator iterator = assertions.iterator(); iterator.hasNext();) {
            XmlPrimitiveAssertion primtive = (XmlPrimitiveAssertion) iterator.next();
            QName qname = primtive.getName();
           
            if (qname != null) {
                if (SP12Constants.HTTP_BASIC_AUTHENTICATION.equals(qname)) {
                    parent.setHttpBasicAuthentication(true);
                } else if (SP12Constants.HTTP_DIGEST_AUTHENTICATION.equals(qname)) {
View Full Code Here

Examples of org.apache.cxf.ws.policy.builder.xml.XmlPrimitiveAssertion

    }

    private void processAlternative(List assertions, TransportToken parent) {

        for (Iterator iterator = assertions.iterator(); iterator.hasNext();) {
            XmlPrimitiveAssertion primtive = (XmlPrimitiveAssertion)iterator.next();
            QName qname = primtive.getName();

            if (SP11Constants.HTTPS_TOKEN.equals(qname)) {
                HttpsToken httpsToken = new HttpsToken(SP11Constants.INSTANCE);
                String attr = DOMUtils.getAttribute(primtive.getValue(),
                                                    SPConstants.REQUIRE_CLIENT_CERTIFICATE);
                if (attr != null) {
                    httpsToken.setRequireClientCertificate("true".equals(attr));
                }
                parent.setToken(httpsToken);
            } else if (SP12Constants.HTTPS_TOKEN.equals(qname)) {
                HttpsToken httpsToken = new HttpsToken(SP12Constants.INSTANCE);
                                
                Element element = DOMUtils.getFirstChildWithName(primtive.getValue(), SPConstants.POLICY);
                
                if (element != null) {
                    Element child = DOMUtils.getFirstElement(element);
                    if (child != null) {
                        if (SP12Constants.HTTP_BASIC_AUTHENTICATION.equals(DOMUtils.getElementQName(child))) {
View Full Code Here

Examples of org.apache.cxf.ws.policy.builder.xml.XmlPrimitiveAssertion

                }
                ignored.add(0, qname);
                if (!alreadyWarned) {
                    LOG.warning(m.toString());
                }
                return new XmlPrimitiveAssertion(element, bus.getExtension(PolicyConstants.class));
            } else {
                throw new PolicyException(m);
            }
        }
View Full Code Here

Examples of org.apache.cxf.ws.policy.builder.xml.XmlPrimitiveAssertion

        assertTrue(!assertion.equal(pc));
        pc = (PolicyComponent)new ExactlyOne();
        assertTrue(!assertion.equal(pc));
       
        IMocksControl ctrl = EasyMock.createNiceControl();
        XmlPrimitiveAssertion xpa = ctrl.createMock(XmlPrimitiveAssertion.class);
        QName oqn = new QName("http://cxf.apache.org/test/assertions/blah", "OtherType");
        EasyMock.expect(xpa.getName()).andReturn(oqn);
        EasyMock.expect(xpa.getType()).andReturn(Constants.TYPE_ASSERTION);
       
        ctrl.replay();
        assertTrue(!assertion.equal(xpa));
        ctrl.verify();
           
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.