Package org.objectweb.celtix.transports

Examples of org.objectweb.celtix.transports.ServerTransport


        EasyMock.replay(ec);

        EndpointReferenceType ref = EndpointReferenceUtils.getEndpointReference(wsdlUrl, serviceName,
                                                                                portName);
        EndpointReferenceUtils.setAddress(ref, address);
        ServerTransport transport = factory.createServerTransport(ref);

        EasyMock.verify(bus);
        EasyMock.verify(bc);
        EasyMock.verify(ec);
View Full Code Here


        URL wsdlUrl = getClass().getResource(testWsdlFileName);
        assertNotNull(wsdlUrl);
              
        createConfiguration(wsdlUrl, serviceName, portName);
       
        ServerTransport server = createServerTransport(wsdlUrl, serviceName,
                                                       portName, address);
        setupCallbackObject(useAutomaticWorkQueue);
       
        server.activate(callback);
       
        TestJMSClientTransport client = createClientTransport(wsdlUrl, serviceName, portName, address);
        OutputStreamMessageContext octx =
            client.createOutputStreamContext(new GenericMessageContext());
       
        setRequestContextHeader(octx);
       
        client.finalPrepareOutputStreamContext(octx);
       
        byte outBytes[] = "Hello World!!!".getBytes();
        octx.getOutputStream().write(outBytes);
       
        // make sure that the inner context that we used to create has the same values that we inserted
        checkContextHeader(client.getContext(), JMSConstants.JMS_CLIENT_REQUEST_HEADERS);
        InputStreamMessageContext ictx = client.invoke(octx);
        byte bytes[] = new byte[10000];
        int len = ictx.getInputStream().read(bytes);
        assertTrue("Did not read anything " + len, len > 0);
        assertEquals(new String(outBytes), new String(bytes, 0, len));
        checkResponseContextHeader(ictx);
      
        server.shutdown();
        client.shutdown();
    }
View Full Code Here

TOP

Related Classes of org.objectweb.celtix.transports.ServerTransport

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.