Package org.apache.cxf.endpoint

Examples of org.apache.cxf.endpoint.Server


       
        Destination destination = EasyMock.createMock(Destination.class);
        EasyMock.expect(destination.getAddress()).andReturn(er);
        EasyMock.replay(destination);       
               
        Server server = EasyMock.createNiceMock(Server.class);
        EasyMock.expect(server.getDestination()).andReturn(destination);
        EasyMock.replay(server);
        return server;
    }
View Full Code Here


            // The properties for the EndpointDescription
            Map<String, Object> endpointProps = createEndpointProps(sd, iClass, new String[]{Constants.WS_CONFIG_TYPE}, address,intents);
           
            Thread.currentThread().setContextClassLoader(ServerFactoryBean.class.getClassLoader());
            Server server = factory.create();

            exportRegistration.setServer(server);
           
            //  add the information on the new Endpoint to the export registration
            EndpointDescription ed = new EndpointDescription(endpointProps);
View Full Code Here

                Constants.RS_CONFIG_TYPE
            }, address,intents);
            EndpointDescription endpdDesc = null;

            Thread.currentThread().setContextClassLoader(JAXRSServerFactoryBean.class.getClassLoader());
            Server server = factory.create();
            exportRegistration.setServer(server);
            endpdDesc = new EndpointDescription(endpointProps);

            // add the information on the new Endpoint to the export registration
            exportRegistration.setEndpointdescription(endpdDesc);
View Full Code Here

                Constants.WS_CONFIG_TYPE
            }, address,intents);
            EndpointDescription endpdDesc = null;
           
            Thread.currentThread().setContextClassLoader(ServerFactoryBean.class.getClassLoader());
            Server server = factory.create();
           
            // TODO: does this still make sense ?!?
            registerStopHook(bus, httpService, server, contextRoot, Constants.WS_HTTP_SERVICE_CONTEXT);
           
            endpdDesc = new EndpointDescription(endpointProps);
View Full Code Here

        EasyMock.replay(sf);
       
        final StringBuilder serverURI = new StringBuilder();
       
        ServerFactoryBean sfb = EasyMock.createNiceMock(ServerFactoryBean.class);
        Server server = createMockServer(sfb);   
       
        EasyMock.expect(sfb.getServiceFactory()).andReturn(sf).anyTimes();
        EasyMock.expect(sfb.create()).andReturn(server);
        sfb.setAddress((String) EasyMock.anyObject());
        EasyMock.expectLastCall().andAnswer(new IAnswer<Object>() {
View Full Code Here

       
        Destination destination = EasyMock.createMock(Destination.class);
        EasyMock.expect(destination.getAddress()).andReturn(er);
        EasyMock.replay(destination);       
               
        Server server = EasyMock.createNiceMock(Server.class);
        EasyMock.expect(server.getDestination()).andReturn(destination);
        EasyMock.replay(server);
        return server;
    }
View Full Code Here

        return bindingInfo;
    }
   
    public Server create() {
        Server server = super.create();
        init();
        checkPrivateEndpoint(server.getEndpoint());
       
        return server;
    }
View Full Code Here

        svrFactory.setServiceClass(Greeter.class);
        svrFactory.setAddress("http://localhost:9000/publishedEndpointUrl");
        svrFactory.setPublishedEndpointUrl(publishedEndpointUrl);
        svrFactory.setServiceBean(implementor);
       
        Server server = svrFactory.create();

        WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader();
        wsdlReader.setFeature("javax.wsdl.verbose", false);
       
        URL url = new URL(svrFactory.getAddress() + "?wsdl=1");
        HttpURLConnection connect = (HttpURLConnection)url.openConnection();
        assertEquals(500, connect.getResponseCode());
       
        Definition wsdl = wsdlReader.readWSDL(svrFactory.getAddress() + "?wsdl");
        assertNotNull(wsdl);
       
        Collection<Service> services = CastUtils.cast(wsdl.getAllServices().values());
        final String failMesg = "WSDL provided incorrect soap:address location";
       
        for (Service service : services) {
            Collection<Port> ports = CastUtils.cast(service.getPorts().values());
            for (Port port : ports) {
                List extensions = port.getExtensibilityElements();
                for (Object extension : extensions) {
                    String actualUrl = null;
                    if (extension instanceof SOAP12Address) {
                        actualUrl = ((SOAP12Address)extension).getLocationURI();
                    } else if (extension instanceof SOAPAddress) {
                        actualUrl = ((SOAPAddress)extension).getLocationURI();
                    }
                   
                    //System.out.println("Checking url: " + actualUrl + " against " + publishedEndpointUrl);
                    assertEquals(failMesg, publishedEndpointUrl, actualUrl);
                }
            }
        }
       
        server.destroy();
    }
View Full Code Here

        return bindingInfo;
    }
   
    public Server create() {
        Server server = super.create();
        init();
        return server;
    }
View Full Code Here

    @Test
    public void testSchema() throws Exception {
        testUtilities.setBus((Bus)applicationContext.getBean("cxf"));
        testUtilities.addDefaultNamespaces();
        testUtilities.addNamespace("aegis", "http://cxf.apache.org/aegisTypes");
        Server s = testUtilities.
            getServerForService(new QName("http://aegis.systest.cxf.apache.org/",
                                          "SportsService"));
        Assert.assertNotNull(s);
        Document wsdl = testUtilities.getWSDLDocument(s);
        Assert.assertNotNull(wsdl);
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.