Package org.apache.cxf.endpoint

Examples of org.apache.cxf.endpoint.ServerRegistry


            throw new RuntimeException("Failed to write javascript utils to HTTP response.", e);
        }
    }
   
    private Endpoint findEndpoint(EndpointInfo endpointInfo) {
        ServerRegistry serverRegistry = bus.getExtension(ServerRegistry.class);
        for (Server server : serverRegistry.getServers()) {
            // Hypothetically, not all destinations have an endpoint.
            // There has to be a better way to do this.
            if (server.getDestination() instanceof DestinationWithEndpoint
                &&
                endpointInfo.
View Full Code Here


        }
        return docs;
    }

    protected Definition getWSDLDefinition(String string) throws WSDLException {
        ServerRegistry svrMan = getBus().getExtension(ServerRegistry.class);
        for (Server s : svrMan.getServers()) {
            Service svc = s.getEndpoint().getService();
            if (svc.getName().getLocalPart().equals(string)) {
                ServiceWSDLBuilder builder = new ServiceWSDLBuilder(bus, svc.getServiceInfos());
                return builder.build();
            }
        }
        String localString = "local://" + string;
        for (Server s : svrMan.getServers()) {
            String s2 = s.getDestination().getAddress().getAddress().getValue();
            if (localString.equals(s2)) {
                Service svc = s.getEndpoint().getService();
                ServiceWSDLBuilder builder = new ServiceWSDLBuilder(bus, svc.getServiceInfos());
                return builder.build();
View Full Code Here

    @Test
    public void testUpDownWithServlets() throws Exception {       
        setUpBus(true);
      
        Bus bus = (Bus)applicationContext.getBean("cxf");
        ServerRegistry sr = bus.getExtension(ServerRegistry.class);
        ServerImpl si = (ServerImpl) sr.getServers().get(0);
        JettyHTTPDestination jhd = (JettyHTTPDestination) si.getDestination();
        JettyHTTPServerEngine e = (JettyHTTPServerEngine) jhd.getEngine();
        org.mortbay.jetty.Server jettyServer = e.getServer();

        Handler[] contexts = jettyServer.getChildHandlersByClass(WebAppContext.class);
View Full Code Here

    @Test
    public void testUpDownWithServlets() throws Exception {       
        setUpBus(true);
      
        Bus bus = (Bus)applicationContext.getBean("cxf");
        ServerRegistry sr = bus.getExtension(ServerRegistry.class);
        ServerImpl si = (ServerImpl) sr.getServers().get(0);
        JettyHTTPDestination jhd = (JettyHTTPDestination) si.getDestination();
        JettyHTTPServerEngine e = (JettyHTTPServerEngine) jhd.getEngine();
        org.eclipse.jetty.server.Server jettyServer = e.getServer();

        Handler[] contexts = jettyServer.getChildHandlersByClass(WebAppContext.class);
View Full Code Here

            throw new RuntimeException("Failed to write javascript utils to HTTP response.", e);
        }
    }
   
    private Endpoint findEndpoint(EndpointInfo endpointInfo) {
        ServerRegistry serverRegistry = bus.getExtension(ServerRegistry.class);
        for (Server server : serverRegistry.getServers()) {
            // Hypothetically, not all destinations have an endpoint.
            // There has to be a better way to do this.
            if (server.getDestination() instanceof DestinationWithEndpoint
                &&
                endpointInfo.
View Full Code Here

        }
        return docs;
    }

    protected Definition getWSDLDefinition(String string) throws WSDLException {
        ServerRegistry svrMan = getBus().getExtension(ServerRegistry.class);
        for (Server s : svrMan.getServers()) {
            Service svc = s.getEndpoint().getService();
            if (svc.getName().getLocalPart().equals(string)) {
                ServiceWSDLBuilder builder = new ServiceWSDLBuilder(bus, svc.getServiceInfos());
                return builder.build();
            }
        }
        String localString = "local://" + string;
        for (Server s : svrMan.getServers()) {
            String s2 = s.getDestination().getAddress().getAddress().getValue();
            if (localString.equals(s2)) {
                Service svc = s.getEndpoint().getService();
                ServiceWSDLBuilder builder = new ServiceWSDLBuilder(bus, svc.getServiceInfos());
                return builder.build();
View Full Code Here

        }
        return docs;
    }

    protected Definition getWSDLDefinition(String string) throws WSDLException {
        ServerRegistry svrMan = getBus().getExtension(ServerRegistry.class);
        for (Server s : svrMan.getServers()) {
            Service svc = s.getEndpoint().getService();
            if (svc.getName().getLocalPart().equals(string)) {
                ServiceWSDLBuilder builder = new ServiceWSDLBuilder(bus, svc.getServiceInfos());
                return builder.build();
            }
View Full Code Here

        wsdlBuilder.setUseSchemaImports(false);
        return wsdlBuilder.build();
    }

    public Server getServerForService(QName serviceName) throws WSDLException {
        ServerRegistry svrMan = bus.getExtension(ServerRegistry.class);
        for (Server s : svrMan.getServers()) {
            Service svc = s.getEndpoint().getService();
            if (svc.getName().equals(serviceName)) {
                return s;
            }
        }
View Full Code Here

        }
        return null;
    }
   
    public Server getServerForAddress(String address) throws WSDLException {
        ServerRegistry svrMan = bus.getExtension(ServerRegistry.class);
        for (Server s : svrMan.getServers()) {
            if (address.equals(s.getEndpoint().getEndpointInfo().getAddress())) {
                return s;
            }
        }
        return null;
View Full Code Here

    @Test
    public void testUpDownWithServlets() throws Exception {       
        setUpBus(true);
      
        Bus bus = (Bus)applicationContext.getBean("cxf");
        ServerRegistry sr = bus.getExtension(ServerRegistry.class);
        ServerImpl si = (ServerImpl) sr.getServers().get(0);
        JettyHTTPDestination jhd = (JettyHTTPDestination) si.getDestination();
        JettyHTTPServerEngine e = (JettyHTTPServerEngine) jhd.getEngine();
        org.eclipse.jetty.server.Server jettyServer = e.getServer();

        Handler[] contexts = jettyServer.getChildHandlersByClass(WebAppContext.class);
View Full Code Here

TOP

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

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.