Package org.apache.cxf.endpoint

Examples of org.apache.cxf.endpoint.ServerImpl


     */
    protected void doPublish(String addr) {
        checkPublishPermission();
        checkPublishable();
       
        ServerImpl serv = null;
       
        try {
            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


                    invoker = createInvoker();
                    getServiceFactory().setInvoker(invoker);
                }
   
                Endpoint ep = createEndpoint();
                server = new ServerImpl(getBus(),
                                        ep,
                                        getDestinationFactory(),
                                        getBindingFactory());
   
                if (ep.getService().getInvoker() == null) {
View Full Code Here

        svrBean.setServiceClass(HelloService.class);
        svrBean.setServiceBean(new HelloServiceImpl());
        svrBean.setBus(getBus());
        svrBean.setDestinationFactory(new CustomDestinationFactory(getBus()));

        ServerImpl server = (ServerImpl)svrBean.create();
        assertTrue(server.getDestination() instanceof CustomDestination);
    }
View Full Code Here

    public void testCXF1758() throws Exception {
        ServerFactoryBean svrBean = new ServerFactoryBean();
        svrBean.setAddress("http://localhost/Generics");
        svrBean.setServiceBean(new TestServiceImpl<String>() { });
        svrBean.setBus(getBus());
        ServerImpl server = (ServerImpl)svrBean.create();
        //XMLUtils.printDOM(getWSDLDocument(server));
        assertValid("//xsd:schema/xsd:complexType[@name='open']/xsd:sequence/"
                    + "xsd:element[@type='xsd:string']",
                    getWSDLDocument(server));
    }
View Full Code Here

     */
    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) {
                    endpointInfo.setProperty(WSDLGetUtils.PUBLISHED_ENDPOINT_URL, publishedEndpointUrl);
                }
                if (publishedEndpointUrl != null && wsdlLocation != null) {
                    //early update the publishedEndpointUrl so that endpoints in the same app sharing the same wsdl
                    //do not require all of them to be queried for wsdl before the wsdl is finally fully updated
                    Definition def = endpointInfo.getService()
                        .getProperty(WSDLServiceBuilder.WSDL_DEFINITION, Definition.class);
                    if (def == null) {
                        def = bus.getExtension(WSDLManager.class).getDefinition(wsdlLocation);
                    }
                    new WSDLGetUtils().updateWSDLPublishedEndpointAddress(def, endpointInfo);
                }

                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

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

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

     */
    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 && wsdlLocation != null) {
                    endpointInfo.setProperty(WSDLGetUtils.PUBLISHED_ENDPOINT_URL, publishedEndpointUrl);
                    //early update the publishedEndpointUrl so that endpoints in the same app sharing the same wsdl
                    //do not require all of them to be queried for wsdl before the wsdl is finally fully updated
                    Definition def = endpointInfo.getService()
                        .getProperty(WSDLServiceBuilder.WSDL_DEFINITION, Definition.class);
                    if (def == null) {
                        def = bus.getExtension(WSDLManager.class).getDefinition(wsdlLocation);
                    }
                    new WSDLGetUtils().updateWSDLPublishedEndpointAddress(def, endpointInfo);
                }

                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

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

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

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

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

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

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

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

TOP

Related Classes of org.apache.cxf.endpoint.ServerImpl

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.