Package org.apache.cxf.ws.policy

Examples of org.apache.cxf.ws.policy.PolicyConstants


        }
        return  null;
    }  
   
    protected PolicyConstants getPolicyConstants() {
        PolicyConstants constants = null;
        if (null != bus) {
            constants = bus.getExtension(PolicyConstants.class);
        }
        if (null == constants) {
            constants = new PolicyConstants();
        }
        return constants;
       
    }
View Full Code Here


        }
        return  null;
    }  
   
    protected PolicyConstants getPolicyConstants() {
        PolicyConstants constants = null;
        if (null != bus) {
            constants = bus.getExtension(PolicyConstants.class);
        }
        if (null == constants) {
            constants = new PolicyConstants();
        }
        return constants;
       
    }
View Full Code Here

    }

    @Override
    protected String resolveId(Element element, AbstractBeanDefinition bean,
                               ParserContext ctx) throws BeanDefinitionStoreException {
        PolicyConstants constants = new PolicyConstants();
        return element.getAttributeNS(constants.getWSUNamespace(), constants.getIdAttrName());
    }
View Full Code Here

    }
   
    @Test
    public void testReadDocumentUnknownDomainExpression() throws MalformedURLException {

        PolicyConstants pc = new PolicyConstants();
        pc.setNamespace(PolicyConstants.NAMESPACE_W3_200607);
        Bus bus = control.createMock(Bus.class);
        EasyMock.expect(bus.getExtension(PolicyConstants.class)).andReturn(pc);
       
        eap = new ExternalAttachmentProvider(bus);
        DomainExpressionBuilderRegistry debr = control.createMock(DomainExpressionBuilderRegistry.class);
View Full Code Here

    public void setUp() {
       
        control = EasyMock.createNiceControl();
       
        bus = control.createMock(Bus.class);
        constants = new PolicyConstants();
        constants.setNamespace(PolicyConstants.NAMESPACE_XMLSOAP_200409);
        EasyMock.expect(bus.getExtension(PolicyConstants.class)).andReturn(constants).anyTimes();
       
        AssertionBuilderRegistry abr = new AssertionBuilderRegistryImpl();
        builder = new PolicyBuilderImpl();
View Full Code Here

        EasyMock.expect(bus.getExtension(DestinationFactoryManager.class)).andReturn(dfm).anyTimes();
        EasyMock.expect(dfm.getDestinationFactory(EasyMock.isA(String.class))).andReturn(null).anyTimes();
        BindingFactoryManager bfm = control.createMock(BindingFactoryManager.class);
        EasyMock.expect(bus.getExtension(BindingFactoryManager.class)).andReturn(bfm).anyTimes();
        EasyMock.expect(bfm.getBindingFactory(EasyMock.isA(String.class))).andReturn(null).anyTimes();
        PolicyConstants constants = new PolicyConstants();
        // test data uses 2004/09 namespace
        constants.setNamespace(PolicyConstants.NAMESPACE_XMLSOAP_200409);
        EasyMock.expect(bus.getExtension(PolicyConstants.class)).andReturn(constants).anyTimes();
        control.replay();
       
        int n = 19;
        services = new ServiceInfo[n];
View Full Code Here

    }
   
    @Before
    public void setUp() {  
        control = EasyMock.createNiceControl();
        constants = new PolicyConstants();
        // test data uses 2004/09 namespace
        constants.setNamespace(PolicyConstants.NAMESPACE_XMLSOAP_200409);
        bus = control.createMock(Bus.class);
        EasyMock.expect(bus.getExtension(PolicyConstants.class)).andReturn(constants).anyTimes();
        AssertionBuilderRegistry abr = new AssertionBuilderRegistryImpl();       
View Full Code Here

            return elementPolicy;
        }
       
        List<UnknownExtensibilityElement> extensions =
            ex.getExtensors(UnknownExtensibilityElement.class);
        PolicyConstants constants = bus.getExtension(PolicyConstants.class);
        if (null != extensions) {
            for (UnknownExtensibilityElement e : extensions) {
                Policy p = null;
                if (constants.getPolicyElemQName().equals(e.getElementType())) {
                    p = builder.getPolicy(e.getElement());                   

                } else if (constants.getPolicyReferenceElemQName().equals(e.getElementType())) {
                    PolicyReference ref = builder.getPolicyReference(e.getElement());
                    if (null != ref) {
                        p = resolveReference(ref, di);
                    }
                }
                if (null != p) {
                    elementPolicy = elementPolicy.merge(p);
                }
            }
        }
       
        if (includeAttributes) {
            Object attr = ex.getExtensionAttribute(constants.getPolicyURIsAttrQName());
            // can be of type a String, a QName, a list of Srings or a list of QNames
            String uris = null;
            if (attr instanceof QName) {
                uris = ((QName)attr).getLocalPart();
            } else if (attr instanceof String) {
View Full Code Here

       
        String localName = elem.getLocalName();
        QName qn = new QName(elem.getNamespaceURI(), localName);
       
        boolean optional = false;
        PolicyConstants constants = bus.getExtension(PolicyConstants.class);
        Attr attribute = elem.getAttributeNodeNS(constants.getNamespace(),
                                                 constants.getOptionalAttrName());
        if (attribute != null) {
            optional = Boolean.valueOf(attribute.getValue());
        }
        if (MetadataConstants.ADDRESSING_ASSERTION_QNAME.equals(qn)) {
            PolicyBuilder builder = bus.getExtension(PolicyBuilder.class);
View Full Code Here

    private PolicyTestUtils() {
        // utility class
    }
   
    public static void setPolicyConstants(Bus bus, String policyNs) {
        PolicyConstants pc = bus.getExtension(PolicyConstants.class);
        pc.setNamespace(policyNs);
    }
View Full Code Here

TOP

Related Classes of org.apache.cxf.ws.policy.PolicyConstants

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.