Package org.objectweb.celtix.bindings

Examples of org.objectweb.celtix.bindings.ServerBinding


       
        BindingFactory factory = bus.getBindingManager().getBindingFactory(bindingId);
        if (null == factory) {
            throw new BusException(new Message("BINDING_FACTORY_MISSING_EXC", LOG, bindingId));
        }
        ServerBinding bindingImpl = factory.createServerBinding(reference, this);
        assert null != bindingImpl;
        return bindingImpl;

    }
View Full Code Here


        assertNotNull("could not get binding factory", bindingFact);
        transport.invoke(req, resp);       
        EasyMock.replay(transport);
       
       
        ServerBinding mockServerBinding = EasyMock.createMock(ServerBinding.class);
       
        bindingFact.createServerBinding((EndpointReferenceType)EasyMock.notNull(),
                                        (ServerBindingEndpointCallback)EasyMock.notNull());
        EasyMock.expectLastCall().andReturn(mockServerBinding);
        mockServerBinding.activate();
       
       
        CeltixWebServiceContainer container = new CeltixWebServiceContainer(portInfo);
        container.setBus(mockBus);
       
View Full Code Here

            System.setProperty(Provider.JAXWSPROVIDER_PROPERTY, epfClassName);
        }
    }

    public void testConstruction() {
        ServerBinding sb = ei.getServerBinding();
        assertNotNull(sb);
        assertTrue(sb instanceof TestServerBinding);
        Binding b = sb.getBinding();
        assertNotNull(b);
        TestServerBinding tsb = (TestServerBinding)sb;
        ServerTransport st = tsb.getTransport();
        assertNull(st);
        EndpointReferenceType ref = ei.getEndpointReferenceType();
View Full Code Here

        assertNull(ref.getAddress());

    }

    public void testActivate() throws Exception {
        ServerBinding sb = ei.getServerBinding();
        try {
            sb.activate();
        } catch (NullPointerException ex) {
            // ignore
        }
        EndpointReferenceType ref = ei.getEndpointReferenceType();
        EndpointReferenceUtils.setAddress(ref, "test://localhost:7777/test");
        sb.activate();
        TestServerBinding tsb = (TestServerBinding)sb;
        ServerTransport st = tsb.getTransport();
        assertNotNull(st);

    }
View Full Code Here

        assertNotNull(st);

    }

    public void testDispatch() throws Exception {
        ServerBinding sb = ei.getServerBinding();
        EndpointReferenceType ref = ei.getEndpointReferenceType();
        EndpointReferenceUtils.setAddress(ref, "test://localhost:7777/test");
        sb.activate();
        TestServerBinding tsb = (TestServerBinding)sb;
        ei.setExecutor(new Executor() {
            public void execute(Runnable command) {
                command.run();           
            }
View Full Code Here

        BindingFactory factory =
            bus.getBindingManager().getBindingFactory("http://schemas.apache.org/yoko/bindings/corba");
       
        EndpointReferenceType address = testUtils.getSimpleTestEndpointReference();
       
        ServerBinding sb = factory.createServerBinding(address, null);
        assertNotNull(sb);
        assertTrue(CorbaServerBinding.class.isInstance(sb));
       
        CorbaServerBinding serverBinding = (CorbaServerBinding)sb;
        Binding binding = serverBinding.getBinding();
View Full Code Here

            //FIXME: This hack is because SAAJImpl uses Thread.currentThread().getContextClassLoader(),
            //this classloader is different from current classLoader.
            previousLoader = Thread.currentThread().getContextClassLoader();
            Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());
            BindingFactory bindingFactory = bus.getBindingManager().getBindingFactory(bindingId);
            ServerBinding serverBinding = bindingFactory.createServerBinding(reference, this);
            serverBinding.activate();
        } catch (Exception e) {
            throw new CeltixServiceInitException(e);
        } finally {
            if (previousLoader != null) {
                Thread.currentThread().setContextClassLoader(previousLoader);
View Full Code Here

TOP

Related Classes of org.objectweb.celtix.bindings.ServerBinding

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.