Package org.apache.cxf.endpoint

Examples of org.apache.cxf.endpoint.Server


        sf.setStart(false);
       
        Configurer c = getBus().getExtension(Configurer.class);
        c.configureBean("server", sf);
       
        Server server = sf.create();
       
        Endpoint endpoint = server.getEndpoint();
        checkAddressInterceptors(endpoint.getInInterceptors());
    }
View Full Code Here


        if (boi == null) {
            throw new Fault(new org.apache.cxf.common.i18n.Message("OPERATIONINFO_NOT_FOUND",
                                                                   BUNDLE));
        }

        Server srv = isColocated(registry.getServers(), senderEndpoint, boi);
       
        if (srv != null) {
            if (LOG.isLoggable(Level.FINE)) {
                LOG.fine("Operation:" + boi.getName() + " dispatched as colocated call.");
            }

            InterceptorChain outChain = message.getInterceptorChain();
            outChain.abort();
            exchange.put(Bus.class, bus);
            message.put(COLOCATED, Boolean.TRUE);
            message.put(Message.WSDL_OPERATION, boi.getName());
            message.put(Message.WSDL_INTERFACE, boi.getBinding().getInterface().getName());
            invokeColocObserver(message, srv.getEndpoint());
            if (!exchange.isOneWay()) {
                invokeInboundChain(exchange, senderEndpoint);
            }
        } else {
            if (LOG.isLoggable(Level.FINE)) {
View Full Code Here

    public void testNamespacedWebParamsBare() throws Exception {
        JaxWsServerFactoryBean sf = new JaxWsServerFactoryBean();
        sf.setAddress("local://localhost/test");
        sf.setServiceClass(FooServiceImpl.class);
       
        Server server = sf.create();
       
        Document doc = getWSDLDocument(server);
       
        assertValid("//xsd:schema[@targetNamespace='http://namespace3']", doc);
        assertValid("//xsd:schema[@targetNamespace='http://namespace5']", doc);
View Full Code Here

        JaxWsServerFactoryBean sf = new JaxWsServerFactoryBean();
        sf.setAddress("local://localhost/test");
        sf.setServiceBean(new FooServiceImpl());
        sf.getServiceFactory().setWrapped(true);
       
        Server server = sf.create();
       
        Document doc = getWSDLDocument(server);
        // DOMUtils.writeXml(doc, System.out);
        assertValid("//xsd:schema[@targetNamespace='http://namespace3']", doc);
View Full Code Here

    public void testCXF2509() throws Exception {
        JaxWsServerFactoryBean factory = new JaxWsServerFactoryBean();
        //factory.setServiceClass(serviceInterface);
        factory.setServiceBean(new GenericsServiceImpl());
        factory.setAddress("local://localhost/test");
        Server server = factory.create();
        Document doc = getWSDLDocument(server);
        //XMLUtils.printDOM(doc);
        assertValid("//xsd:schema/xsd:complexType[@name='entity']", doc);
    }
View Full Code Here

    @Test
    public void testCXF1758() throws Exception {
        JaxWsServerFactoryBean factory = new JaxWsServerFactoryBean();
        factory.setServiceBean(new GenericsService2Impl());
        factory.setAddress("local://localhost/test");
        Server server = null;
        server = factory.create();
        Document doc = getWSDLDocument(server);
        //org.apache.cxf.helpers.XMLUtils.printDOM(doc);
        assertValid("//xsd:schema/xsd:complexType[@name='convert']/xsd:sequence/xsd:element[@type='xs:int']",
                    doc);
View Full Code Here

    public void testCXF1510() throws Exception {
        JaxWsServerFactoryBean factory = new JaxWsServerFactoryBean();
        factory.setServiceClass(NoRootBare.class);
        factory.setServiceBean(new NoRootBareImpl());
        factory.setAddress("local://localhost/testNoRootBare");
        Server server = factory.create();
        server.start();
       
        QName serviceName = new QName("http://service.jaxws.cxf.apache.org/", "NoRootBareService");
        QName portName = new QName("http://service.jaxws.cxf.apache.org/", "NoRootBarePort");

        ServiceImpl service = new ServiceImpl(getBus(), (URL)null, serviceName, null);
View Full Code Here

    public void testCXF2766() throws Exception {
        JaxWsServerFactoryBean factory = new JaxWsServerFactoryBean();
        factory.setServiceClass(CXF2766.class);
        factory.setServiceBean(new CXF2766Impl());
        factory.setAddress("local://localhost/testcxf2766");
        Server server = factory.create();
        server.getEndpoint().getInInterceptors().add(new LoggingInInterceptor());
        server.getEndpoint().getOutInterceptors().add(new LoggingOutInterceptor());
        Document doc = getWSDLDocument(server);
        //org.apache.cxf.helpers.XMLUtils.printDOM(doc);
        assertValid("//wsdl:message[@name='doReturnResponse']/wsdl:part[@name='returnResponse']", doc);
       
        QName serviceName = new QName("http://cxf.apache.org/service.wsdl", "BareService");
View Full Code Here

        case SERVER_CREATED: {
            Class<?> cls = (Class<?>)args[2];
            if (cls == null) {
                return;
            }
            Server server = (Server)args[0];
            Bus bus = factory.getBus();
            addGZipSupport(server.getEndpoint(), bus, cls.getAnnotation(GZIP.class));
            addSchemaValidationSupport(server.getEndpoint(), cls.getAnnotation(SchemaValidation.class));
            addFastInfosetSupport(server.getEndpoint(), cls.getAnnotation(FastInfoset.class));
            addLoggingSupport(server.getEndpoint(), bus, cls.getAnnotation(Logging.class));
            addEndpointProperties(server.getEndpoint(), bus, cls.getAnnotation(EndpointProperty.class));
            EndpointProperties props = cls.getAnnotation(EndpointProperties.class);
            if (props != null) {
                addEndpointProperties(server.getEndpoint(), bus, props.value());
            }
            setScope(factory, server, cls);
            break;
        }
        case INTERFACE_OPERATION_BOUND: {
View Full Code Here

        JAXRSServerFactoryBean sf = new JAXRSServerFactoryBean();
        Customer customer = new Customer();
        sf.setServiceBeanObjects(customer);
        sf.setApplication(app);
        sf.setStart(false);
        Server server = sf.create()
        assertSame(app, customer.getApplication1());
        assertSame(app, customer.getApplication2());
        ThreadLocalProxy proxy = (ThreadLocalProxy)app.getUriInfo();
        assertNotNull(proxy);
        invokeCustomerMethod(sf.getServiceFactory().getClassResourceInfo().get(0),
View Full Code Here

TOP

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

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.