Package org.objectweb.celtix

Examples of org.objectweb.celtix.Bus


        String portName = "SoapPort";
       
        EndpointReferenceType epr = EndpointReferenceUtils.getEndpointReference(url, serviceName, portName);
        WSDLManager wsdlManager = new WSDLManagerImpl(null);
       
        Bus bus = EasyMock.createMock(Bus.class);
        bus.getWSDLManager();
        EasyMock.expectLastCall().andReturn(wsdlManager).times(2);
        EasyMock.replay(bus);
       
        RMPolicyProvider provider = new RMPolicyProvider(bus, epr);
        assertNull(provider.getObject("rmPolicy"));
View Full Code Here


        String portName = "WSHttpBinding_IPing";

        EndpointReferenceType epr = EndpointReferenceUtils.getEndpointReference(url, serviceName, portName);
        WSDLManager wsdlManager = new WSDLManagerImpl(null);

        Bus bus = EasyMock.createMock(Bus.class);
        bus.getWSDLManager();
        EasyMock.expectLastCall().andReturn(wsdlManager).times(2);
        EasyMock.replay(bus);

        RMPolicyProvider provider = new RMPolicyProvider(bus, epr);
        RMAssertionType rma = (RMAssertionType)provider.getObject("rmAssertion");
View Full Code Here

        String portName = "SoapPort";

        EndpointReferenceType epr = EndpointReferenceUtils.getEndpointReference(url, serviceName, portName);
        WSDLManager wsdlManager = new WSDLManagerImpl(null);

        Bus bus = EasyMock.createMock(Bus.class);
        bus.getWSDLManager();
        EasyMock.expectLastCall().andReturn(wsdlManager).times(2);
        EasyMock.replay(bus);

        RMPolicyProvider provider = new RMPolicyProvider(bus, epr);
        assertNotNull(EndpointReferenceUtils.getPort(wsdlManager, epr));
View Full Code Here

        String portName = "SoapPort";

        EndpointReferenceType epr = EndpointReferenceUtils.getEndpointReference(url, serviceName, portName);
        WSDLManager wsdlManager = new WSDLManagerImpl(null);

        Bus bus = EasyMock.createMock(Bus.class);
        bus.getWSDLManager();
        EasyMock.expectLastCall().andReturn(wsdlManager).times(2);
        EasyMock.replay(bus);

        RMPolicyProvider provider = new RMPolicyProvider(bus, epr);
        assertNotNull(EndpointReferenceUtils.getPort(wsdlManager, epr));
View Full Code Here

        String portName = "SoapPort";

        EndpointReferenceType epr = EndpointReferenceUtils.getEndpointReference(url, serviceName, portName);
        WSDLManager wsdlManager = new WSDLManagerImpl(null);

        Bus bus = EasyMock.createMock(Bus.class);
        bus.getWSDLManager();
        EasyMock.expectLastCall().andReturn(wsdlManager).times(2);
        EasyMock.replay(bus);

        RMPolicyProvider provider = new RMPolicyProvider(bus, epr);
        assertNotNull(EndpointReferenceUtils.getPort(wsdlManager, epr));
View Full Code Here

    public static void main(String[] args) {
        junit.textui.TestRunner.run(SoapBindingFactoryTest.class);
    }
   
    public void testCreateClientBinding() throws Exception {
        Bus bus = Bus.init(new String[0]);
        BindingFactory factory =
            bus.getBindingManager().getBindingFactory(
                "http://schemas.xmlsoap.org/wsdl/soap/");
        assertNotNull(factory);
       
        URL url = getClass().getClassLoader().getResource(".");
        URL wsdlUrl = new URL(url, "../classes-tests/wsdl/hello_world.wsdl");
        assertNotNull(wsdlUrl);
        QName serviceName = new QName("http://objectweb.org/hello_world_soap_http", "SOAPService");
        EndpointReferenceType address = EndpointReferenceUtils
            .getEndpointReference(wsdlUrl, serviceName, "SoapPort");
       
        ClientBinding clientBinding = factory.createClientBinding(address);
        assertNotNull(clientBinding);
        assertTrue(SOAPClientBinding.class.isInstance(clientBinding));
       
        SOAPClientBinding soapClientBinding = (SOAPClientBinding)clientBinding;
        Binding b = soapClientBinding.getBinding();
        assertNotNull(b);
        assertTrue(SOAPBindingImpl.class.isInstance(b));
              
        bus.shutdown(true);      
    }
View Full Code Here


    RMSource(RMHandler h) {
        super(h);
        map = new HashMap<String, SourceSequence>();
        Bus bus = h.getBus();
        bus.getLifeCycleManager().registerLifeCycleListener(new BusLifeCycleListener() {
            public void initComplete() {     
            }
            public void postShutdown() {     
            }
            public void preShutdown() {
View Full Code Here

    public void setUp() {
        properties = new HashMap<String, Object>();
    }

    public void tearDown() throws Exception {
        Bus bus = Bus.getCurrent();
        bus.shutdown(true);
        Bus.setCurrent(null);
    }
View Full Code Here

        Bus.setCurrent(null);
    }

    public void testServiceCreation() throws Exception {
        properties.put("org.objectweb.celtix.BusId", "MPT1");
        Bus bus = Bus.init(null, properties);
        Bus.setCurrent(bus);

        URL wsdlUrl = getClass().getResource("resources/router.wsdl");
        Definition def = bus.getWSDLManager().getDefinition(wsdlUrl);

        QName sourceSrv = new QName("http://objectweb.org/HWRouter", "HTTPSoapServiceSource");
        String sourcePort = new String("HTTPSoapPortSource");
        QName destSrv = new QName("http://objectweb.org/HWRouter", "HTTPSoapServiceDestination");
        String destPort = new String("HTTPSoapPortDestination");
View Full Code Here

        addr.setAddress(uri);
        QName serviceName = new QName("http://www.w3.org/2004/08/wsdl", "testServiceName");
        EndpointReferenceUtils.setServiceAndPortName(addr, serviceName, "");
       
        MockBusFactory busFactory = new MockBusFactory();
        Bus mockBus = busFactory.createMockBus();
        busFactory.replay();

        factory.init(mockBus);
       
    }
View Full Code Here

TOP

Related Classes of org.objectweb.celtix.Bus

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.