Examples of JaxWsServerFactoryBean


Examples of org.apache.cxf.jaxws.JaxWsServerFactoryBean

            doInit = false;
        }
    }
   
    protected void doPublish(String address) {
        JaxWsServerFactoryBean svrFactory = new GeronimoJaxWsServerFactoryBean();
        svrFactory.setBus(bus);
        svrFactory.setAddress(address);
        svrFactory.setServiceFactory(serviceFactory);
        svrFactory.setStart(false);
        svrFactory.setServiceBean(implementor);
             
        if (HTTPBinding.HTTP_BINDING.equals(implInfo.getBindingType())) {
            svrFactory.setTransportId("http://cxf.apache.org/bindings/xformat");
        }
       
        server = svrFactory.create();
       
        init();

        org.apache.cxf.endpoint.Endpoint endpoint = getEndpoint();
View Full Code Here

Examples of org.apache.cxf.jaxws.JaxWsServerFactoryBean

   
    @BeforeClass
    public static void setUpBeforeClass() throws Exception {
        createStaticBus();
        JaxWsServerFactoryBean factory = new JaxWsServerFactoryBean();
        factory.setBus(getStaticBus());
        factory.setAddress("udp://:" + PORT);
        factory.setServiceBean(new GreeterImpl());
        server = factory.create();
    }
View Full Code Here

Examples of org.apache.cxf.jaxws.JaxWsServerFactoryBean

   
   
    @SuppressWarnings("deprecation")
    @Before
    public void before() throws Exception {
        JaxWsServerFactoryBean sf = new JaxWsServerFactoryBean();
        sf.setAddress("http://localhost:" + PORT + "/Echo");
        sf.setDataBinding(new AegisDatabinding());
        sf.setServiceBean(new Echo());
        sf.getInInterceptors().add(new URIMappingInterceptor());
        Server server = sf.create();
        // turn off nanny in URIMappingInterceptor
        server.getEndpoint()
            .getService().put(AbstractInDatabindingInterceptor.NO_VALIDATE_PARTS, Boolean.TRUE);
       
        ServerFactoryBean sf2 = new ServerFactoryBean();
View Full Code Here

Examples of org.apache.cxf.jaxws.JaxWsServerFactoryBean

public class PolicyAnnotationTest extends Assert {

    @org.junit.Test
    public void testAnnotations() throws Exception {
        Bus bus = BusFactory.getDefaultBus();
        JaxWsServerFactoryBean factory = new JaxWsServerFactoryBean();
        factory.setBus(bus);
        factory.setServiceBean(new TestImpl());
        factory.setStart(false);
        List<String> tp = Arrays.asList(
            "http://schemas.xmlsoap.org/soap/http",
            "http://schemas.xmlsoap.org/wsdl/http/",
            "http://schemas.xmlsoap.org/wsdl/soap/http",
            "http://www.w3.org/2003/05/soap/bindings/HTTP/",
            "http://cxf.apache.org/transports/http/configuration",
            "http://cxf.apache.org/bindings/xformat");
       
        LocalTransportFactory f = new LocalTransportFactory(bus);
        f.getUriPrefixes().add("http");
        f.setTransportIds(tp);
        f.setBus(bus);
        f.register();
       
       
        Server s = factory.create();

        try {
            ServiceWSDLBuilder builder = new ServiceWSDLBuilder(bus,
                                                                s.getEndpoint().getService()
                                                                    .getServiceInfos());
View Full Code Here

Examples of org.apache.cxf.jaxws.JaxWsServerFactoryBean

        }
    }
    @org.junit.Test
    public void testAnnotationsInterfaceAsClass() throws Exception {
        Bus bus = BusFactory.getDefaultBus();
        JaxWsServerFactoryBean factory = new JaxWsServerFactoryBean();
        factory.setBus(bus);
        factory.setServiceBean(new TestImpl());
        factory.setServiceClass(TestInterface.class);
        factory.setStart(false);
        List<String> tp = Arrays.asList(
            "http://schemas.xmlsoap.org/soap/http",
            "http://schemas.xmlsoap.org/wsdl/http/",
            "http://schemas.xmlsoap.org/wsdl/soap/http",
            "http://www.w3.org/2003/05/soap/bindings/HTTP/",
            "http://cxf.apache.org/transports/http/configuration",
            "http://cxf.apache.org/bindings/xformat");
       
        LocalTransportFactory f = new LocalTransportFactory(bus);
        f.getUriPrefixes().add("http");
        f.setTransportIds(tp);
        f.setBus(bus);
        f.register();
       
       
        Server s = factory.create();

        try {
            ServiceWSDLBuilder builder = new ServiceWSDLBuilder(bus,
                                                                s.getEndpoint().getService()
                                                                    .getServiceInfos());
View Full Code Here

Examples of org.apache.cxf.jaxws.JaxWsServerFactoryBean

       
        Factory factory = new PerRequestFactory(DocLitWrappedCodeFirstServiceImpl.class);
        factory = new PooledFactory(factory, 4);
       
        JAXWSMethodInvoker invoker = new JAXWSMethodInvoker(factory);
        JaxWsServerFactoryBean factoryBean;
       
        factoryBean = new JaxWsServerFactoryBean();
        factoryBean.setAddress(DOCLIT_CODEFIRST_URL);
        factoryBean.setServiceClass(DocLitWrappedCodeFirstServiceImpl.class);
        factoryBean.setInvoker(invoker);
        servers.add(factoryBean.create());
       
        factoryBean = new JaxWsServerFactoryBean();
        factoryBean.setAddress(DOCLIT_CODEFIRST_SETTINGS_URL);
        factoryBean.setServiceClass(DocLitWrappedCodeFirstServiceImpl.class);
        factoryBean.setInvoker(invoker);
        factoryBean.getServiceFactory().setAnonymousWrapperTypes(true);
        factoryBean.getServiceFactory().getServiceConfigurations().add(0, new AbstractServiceConfiguration() {
            public Boolean isWrapperPartNillable(MessagePartInfo mpi) {
                return Boolean.TRUE;
            }
            public Long getWrapperPartMinOccurs(MessagePartInfo mpi) {
                return Long.valueOf(1L);
            }
        });
        servers.add(factoryBean.create());
        
        //Object implementor4 = new DocLitWrappedCodeFirstServiceImpl();
        //endpoints.add(Endpoint.publish(DOCLIT_CODEFIRST_URL, implementor4));
       
        Object implementor7 = new DocLitBareCodeFirstServiceImpl();
View Full Code Here

Examples of org.apache.cxf.jaxws.JaxWsServerFactoryBean

    }
   
    public void setupServer(boolean mtomRequired, String address) throws Exception {
        getStaticBus().getExtension(PolicyEngine.class).setAlternativeSelector(
            new FirstAlternativeSelector());
        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

Examples of org.apache.cxf.jaxws.JaxWsServerFactoryBean

            + "?jndiInitialContextFactory"
            + "=org.apache.activemq.jndi.ActiveMQInitialContextFactory"
            + "&jndiConnectionFactoryName=ConnectionFactory&jndiURL="
            +  broker.getBrokerURL();
        Hello implementor = new HelloImpl();
        JaxWsServerFactoryBean svrFactory = new JaxWsServerFactoryBean();
        svrFactory.setServiceClass(Hello.class);
        svrFactory.setAddress(address);
        svrFactory.setTransportId(JMSSpecConstants.SOAP_JMS_SPECIFICATION_TRANSPORTID);
        svrFactory.setServiceBean(implementor);
        svrFactory.create();
    }
View Full Code Here

Examples of org.apache.cxf.jaxws.JaxWsServerFactoryBean

*/
public class PersonServiceStarter {
   
    public void startService() {
        PersonServiceImpl personServiceImpl = new PersonServiceImpl();
        JaxWsServerFactoryBean factory = new JaxWsServerFactoryBean();
        factory.setAddress("http://localhost:8282/person");
        factory.setServiceClass(PersonService.class);
        factory.setServiceBean(personServiceImpl);
        Server server = factory.create();
        server.start();
    }
View Full Code Here

Examples of org.apache.cxf.jaxws.JaxWsServerFactoryBean

    private static Server server;

    @BeforeClass
    public static void startServer() {
        PersonService personService = new PersonServiceImpl();
        JaxWsServerFactoryBean factory = new JaxWsServerFactoryBean();
        factory.setAddress(PERSONSERVICE_TESTURL);
        factory.setServiceBean(personService);
        server = factory.create();
        server.start();
    }
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.