Examples of ServerImpl


Examples of org.apache.cxf.endpoint.ServerImpl

                                                  : getServiceClass()
                                              : getServiceClass() == null
                                                  ? ClassHelper.getRealClass(getServiceBean())
                                                  : getServiceClass());
                               
                server = new ServerImpl(getBus(),
                                        ep,
                                        getDestinationFactory(),
                                        getBindingFactory());
   
                if (ep.getService().getInvoker() == null) {
View Full Code Here

Examples of org.apache.cxf.endpoint.ServerImpl

            } else if (serviceBean != null) {
                getServiceFactory().setInvoker(createInvoker());
            }

            Endpoint ep = createEndpoint();
            server = new ServerImpl(getBus(),
                                    ep,
                                    getDestinationFactory(),
                                    getBindingFactory());

            if (invoker == null) {
View Full Code Here

Examples of org.apache.cxf.endpoint.ServerImpl

   
    protected void doPublish(String addr) {
        checkPublishPermission();
       
        try {
            ServerImpl serv = getServer(addr);
            if (addr != null) {           
                EndpointInfo endpointInfo = serv.getEndpoint().getEndpointInfo();
                if (!endpointInfo.getAddress().contains(addr)) {
                    endpointInfo.setAddress(addr);
                }
                if (publishedEndpointUrl != null) {
                    // TODO is there a good place to put this key-string as a constant?
                    endpointInfo.setProperty("publishedEndpointUrl", publishedEndpointUrl);
                }
                this.address = endpointInfo.getAddress();
            }
            serv.start();
        } catch (WebServiceException ex) {
            throw ex;
        } catch (Exception ex) {
            throw new WebServiceException(ex);
        }
View Full Code Here

Examples of org.apache.cxf.endpoint.ServerImpl

        JaxWsServerFactoryBean svrFactory = new JaxWsServerFactoryBean();
        svrFactory.setBus(bus);
        svrFactory.setServiceFactory(bean);
        svrFactory.setStart(false);

        ServerImpl server = (ServerImpl)svrFactory.create();
        assertTrue(server.getEndpoint().getService().getInvoker() instanceof JAXWSMethodInvoker);

        Endpoint endpoint = server.getEndpoint();
        Binding binding = endpoint.getBinding();
        assertTrue(binding instanceof SoapBinding);
    }
View Full Code Here

Examples of org.apache.cxf.endpoint.ServerImpl

        svrFactory.setServiceFactory(bean);
        String address = "http://localhost:9000/test";
        svrFactory.setAddress(address);
        svrFactory.setTransportId(LocalTransportFactory.TRANSPORT_ID);

        ServerImpl server = (ServerImpl)svrFactory.create();

        assertEquals(1, service.getServiceInfos().get(0).getEndpoints().size());

        Endpoint endpoint = server.getEndpoint();
        Binding binding = endpoint.getBinding();
        assertTrue(binding instanceof XMLBinding);
       
        Node res = invoke(address, LocalTransportFactory.TRANSPORT_ID,
                          "/org/apache/cxf/jaxws/provider/sayHi.xml");
View Full Code Here

Examples of org.apache.cxf.endpoint.ServerImpl

        svrFactory.setBus(getBus());
        svrFactory.setServiceFactory(bean);
        String address = "local://localhost:9000/test";
        svrFactory.setAddress(address);

        ServerImpl server = (ServerImpl)svrFactory.create();

        // See if our endpoint was created correctly
        assertEquals(1, service.getServiceInfos().get(0).getEndpoints().size());

        Endpoint endpoint = server.getEndpoint();
        Binding binding = endpoint.getBinding();
        assertTrue(binding instanceof SoapBinding);

        SoapBindingInfo sb = (SoapBindingInfo)endpoint.getEndpointInfo().getBinding();
        assertEquals("document", sb.getStyle());
View Full Code Here

Examples of org.apache.cxf.endpoint.ServerImpl

        svrFactory.setBus(getBus());
        svrFactory.setServiceFactory(bean);
        String address = "local://localhost:9000/test";
        svrFactory.setAddress(address);

        ServerImpl server = (ServerImpl)svrFactory.create();

        Endpoint endpoint = server.getEndpoint();
        Binding binding = endpoint.getBinding();
        assertTrue(binding instanceof SoapBinding);

        SoapBindingInfo sb = (SoapBindingInfo)endpoint.getEndpointInfo().getBinding();
        assertEquals("document", sb.getStyle());
View Full Code Here

Examples of org.apache.cxf.endpoint.ServerImpl

                serviceFactory.create();
                updateClassResourceProviders();
            }
           
            Endpoint ep = createEndpoint();
            server = new ServerImpl(getBus(),
                                    ep,
                                    getDestinationFactory(),
                                    getBindingFactory());

            Invoker invoker = serviceFactory.getInvoker();
View Full Code Here

Examples of org.apache.cxf.endpoint.ServerImpl

                serviceFactory.create();
                updateClassResourceProviders();
            }
           
            Endpoint ep = createEndpoint();
            server = new ServerImpl(getBus(),
                                    ep,
                                    getDestinationFactory(),
                                    getBindingFactory());

            Invoker invoker = serviceFactory.getInvoker();
View Full Code Here

Examples of org.apache.cxf.endpoint.ServerImpl

     */
    protected void doPublish(String addr) {
        checkPublishPermission();
        checkPublishable();
       
        ServerImpl serv = null;
       
        ClassLoaderHolder loader = null;
        try {
            if (bus != null) {
                ClassLoader newLoader = bus.getExtension(ClassLoader.class);
                if (newLoader != null) {
                    loader = ClassLoaderUtils.setThreadContextClassloader(newLoader);
                }
            }
            serv = getServer(addr);
            if (addr != null) {           
                EndpointInfo endpointInfo = serv.getEndpoint().getEndpointInfo();
                if (!endpointInfo.getAddress().contains(addr)) {
                    endpointInfo.setAddress(addr);
                }
                if (publishedEndpointUrl != null) {
                    // TODO is there a good place to put this key-string as a constant?
                    endpointInfo.setProperty("publishedEndpointUrl", publishedEndpointUrl);
                }

                if (null != properties) {
                    for (Entry<String, Object> entry : properties.entrySet()) {
                        endpointInfo.setProperty(entry.getKey(), entry.getValue());
                    }
                }

                this.address = endpointInfo.getAddress();
            }
            serv.start();
            publishable = false;
        } catch (Exception ex) {
            try {
                stop();
            } catch (Exception e) {
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.