Package org.apache.cxf.ws.policy

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


        JaxWsServerFactoryBean sf = new JaxWsServerFactoryBean();
        sf.setServiceBean(new EchoService());
        sf.setBus(getStaticBus());
        sf.setAddress(address);
       
        WSPolicyFeature policyFeature = new WSPolicyFeature();
        List<Element> policyElements = new ArrayList<Element>();
        if (mtomRequired) {
            policyElements.add(StaxUtils.read(
                getClass().getResourceAsStream("mtom-policy.xml"))
                           .getDocumentElement());
        } else {
            policyElements.add(StaxUtils.read(
                getClass().getResourceAsStream("mtom-policy-optional.xml"))
                           .getDocumentElement());
        }
        policyFeature.setPolicyElements(policyElements);      
       
        sf.getFeatures().add(policyFeature);
       
        sf.create();
    }
View Full Code Here


        JaxWsServerFactoryBean sf = new JaxWsServerFactoryBean();
        sf.setServiceBean(new EchoService());
        sf.setBus(getBus());
        sf.setAddress(address);
       
        WSPolicyFeature policyFeature = new WSPolicyFeature();
        List<Element> policyElements = new ArrayList<Element>();
        if (mtomRequired) {
            policyElements.add(DOMUtils.readXml(
                getClass().getResourceAsStream("mtom-policy.xml"))
                           .getDocumentElement());
        } else {
            policyElements.add(DOMUtils.readXml(
                getClass().getResourceAsStream("mtom-policy-optional.xml"))
                           .getDocumentElement());
        }
        policyFeature.setPolicyElements(policyElements);      
       
        sf.getFeatures().add(policyFeature);
       
        sf.create();
    }
View Full Code Here

       
        Policy p = new Policy();
        p.setId("test");
       
        JaxWsServerFactoryBean sf = new JaxWsServerFactoryBean();
        sf.getFeatures().add(new WSPolicyFeature(p));
        sf.setServiceBean(new GreeterImpl());
        sf.setAddress("http://localhost/test");
        sf.setStart(false);
        sf.setBus(bus);
        Server server = sf.create();
View Full Code Here

       
        Policy p = new Policy();
        p.setId("test");
       
        JaxWsServerFactoryBean sf = new JaxWsServerFactoryBean();
        sf.getFeatures().add(new WSPolicyFeature(p));
        sf.setServiceBean(new GreeterImpl());
        sf.setAddress("http://localhost/test");
        sf.setStart(false);
        sf.setBus(bus);
        Server server = sf.create();
View Full Code Here

        JaxWsServerFactoryBean sf = new JaxWsServerFactoryBean();
        sf.setServiceBean(new EchoService());
        sf.setBus(getStaticBus());
        sf.setAddress(address);
       
        WSPolicyFeature policyFeature = new WSPolicyFeature();
        List<Element> policyElements = new ArrayList<Element>();
        if (mtomRequired) {
            policyElements.add(StaxUtils.read(
                getClass().getResourceAsStream("mtom-policy.xml"))
                           .getDocumentElement());
        } else {
            policyElements.add(StaxUtils.read(
                getClass().getResourceAsStream("mtom-policy-optional.xml"))
                           .getDocumentElement());
        }
        policyFeature.setPolicyElements(policyElements);      
       
        sf.getFeatures().add(policyFeature);
       
        sf.create();
    }
View Full Code Here

        JaxWsServerFactoryBean sf = new JaxWsServerFactoryBean();
        sf.setServiceBean(new EchoService());
        sf.setBus(getBus());
        sf.setAddress(address);
       
        WSPolicyFeature policyFeature = new WSPolicyFeature();
        List<Element> policyElements = new ArrayList<Element>();
        if (mtomRequired) {
            policyElements.add(DOMUtils.readXml(
                getClass().getResourceAsStream("mtom-policy.xml"))
                           .getDocumentElement());
        } else {
            policyElements.add(DOMUtils.readXml(
                getClass().getResourceAsStream("mtom-policy-optional.xml"))
                           .getDocumentElement());
        }
        policyFeature.setPolicyElements(policyElements);      
       
        sf.getFeatures().add(policyFeature);
       
        sf.create();
    }
View Full Code Here

       
        Policy p = new Policy();
        p.setId("test");
       
        JaxWsServerFactoryBean sf = new JaxWsServerFactoryBean();
        sf.getFeatures().add(new WSPolicyFeature(p));
        sf.setServiceBean(new GreeterImpl());
        sf.setAddress("http://localhost/test");
        sf.setStart(false);
        sf.setBus(bus);
        Server server = sf.create();
View Full Code Here

        }
        if (correlationIDCallbackHandler != null && (!useServiceRegistry)) {
            features.add(new CorrelationIDFeature());
        }
        if (null != securityArguments.getPolicy()) {
            features.add(new WSPolicyFeature(securityArguments.getPolicy()));
        }
        if (logging) {
            features.add(new org.apache.cxf.feature.LoggingFeature());
        }
        clientFactory.setFeatures(features);
View Full Code Here

            if (sr.getEndpoint().getService() == locatorEndpoint.getService())
                srv = sr;
        }

        List<Feature> activeFeatures = locatorEndpoint.getFeatures();
        WSPolicyFeature policyFeature = new WSPolicyFeature();

        activeFeatures.add(policyFeature);

        policyFeature.setPolicies(policies);
        policyFeature.initialize(srv, currentBus);

    }
View Full Code Here

       
        Policy p = new Policy();
        p.setId("test");
       
        JaxWsServerFactoryBean sf = new JaxWsServerFactoryBean();
        sf.getFeatures().add(new WSPolicyFeature(p));
        sf.setServiceBean(new GreeterImpl());
        sf.setAddress("http://localhost/test");
        sf.setStart(false);
        sf.setBus(bus);
        Server server = sf.create();
View Full Code Here

TOP

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

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.