Package org.apache.cxf.endpoint

Examples of org.apache.cxf.endpoint.ServerRegistry


        return slclCapture;
    }

    private Bus addRegisteredServers(Bus bus, List<Server> registeredServers) {
        ServerRegistry sr = createMock(ServerRegistry.class);
        expect(sr.getServers()).andStubReturn(registeredServers);

        expect(bus.getExtension(ServerRegistry.class)).andStubReturn(sr);
        return null;
    }
View Full Code Here


        return slclCapture;
    }

    private Bus addRegisteredServers(Bus bus, List<Server> registeredServers) {
        ServerRegistry sr = createMock(ServerRegistry.class);
        expect(sr.getServers()).andStubReturn(registeredServers);

        expect(bus.getExtension(ServerRegistry.class)).andStubReturn(sr);
        return null;
    }
View Full Code Here

   
   
    private static MultiplexDestination getMatchingMultiplexDestination(QName serviceQName, String portName,
                                                                        Bus bus) {
        MultiplexDestination destination = null;
        ServerRegistry serverRegistry = bus.getExtension(ServerRegistry.class);
        if (null != serverRegistry) {
            List<Server> servers = serverRegistry.getServers();
            for (Server s : servers) {
                QName targetServiceQName = s.getEndpoint().getEndpointInfo().getService().getName();
                if (serviceQName.equals(targetServiceQName) && portNameMatches(s, portName)) {
                    Destination dest = s.getDestination();
                    if (dest instanceof MultiplexDestination) {
View Full Code Here

    }
   
    private static MultiplexDestination getMatchingMultiplexDestination(QName serviceQName, String portName,
                                                                        Bus bus) {
        MultiplexDestination destination = null;
        ServerRegistry serverRegistry = (ServerRegistry)bus.getExtension(ServerRegistry.class);
        if (null != serverRegistry) {
            List<Server> servers = serverRegistry.getServers();
            for (Server s : servers) {
                QName targetServiceQName = s.getEndpoint().getEndpointInfo().getService().getName();
                if (serviceQName.equals(targetServiceQName) && portNameMatches(s, portName)) {
                    Destination dest = s.getDestination();
                    if (dest instanceof MultiplexDestination) {
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

        }
        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

            if (bus == null) {
                throw new Fault(new org.apache.cxf.common.i18n.Message("BUS_NOT_FOUND", BUNDLE));
            }
        }
       
        ServerRegistry registry = bus.getExtension(ServerRegistry.class);
       
        if (registry == null) {
            throw new Fault(new org.apache.cxf.common.i18n.Message("SERVER_REGISTRY_NOT_FOUND", BUNDLE));
        }
       
        Exchange exchange = message.getExchange();
        Endpoint senderEndpoint = exchange.get(Endpoint.class);

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

        BindingOperationInfo boi = exchange.get(BindingOperationInfo.class);
       
        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.");
            }
View Full Code Here

        protected void run()  {           
            SpringBusFactory bf = new SpringBusFactory();
            Bus bus = bf.createBus("org/apache/cxf/systest/ws/policy/rmwsdl_server.xml");
            BusFactory.setDefaultBus(bus);
           
            ServerRegistry sr = bus.getExtension(ServerRegistry.class);
            PolicyEngine pe = bus.getExtension(PolicyEngine.class);
           
            List<Assertion> assertions1 = getAssertions(pe, sr.getServers().get(0));
            assertEquals("2 assertions should be available", 2, assertions1.size());
            List<Assertion> assertions2 = getAssertions(pe, sr.getServers().get(1));
            assertEquals("1 assertion should be available", 1, assertions2.size());
           
            LOG.info("Published greeter endpoints.");
        }
View Full Code Here

    @Test
    public void testColocOutInvalidEndpoint() throws Exception {

        Bus bus = setupBus();
        ServerRegistry sr = control.createMock(ServerRegistry.class);
        EasyMock.expect(bus.getExtension(ServerRegistry.class)).andReturn(sr);

        control.replay();
        try {
            colocOut.handleMessage(msg);
View Full Code Here

    @Test
    public void testColocOutInvalidOperation() throws Exception {

        Bus bus = setupBus();
        ServerRegistry sr = control.createMock(ServerRegistry.class);
        EasyMock.expect(bus.getExtension(ServerRegistry.class)).andReturn(sr);

        Endpoint ep = control.createMock(Endpoint.class);
        ex.put(Endpoint.class, ep);
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.