Package org.objectweb.celtix.bus.bindings

Examples of org.objectweb.celtix.bus.bindings.TestInputStreamContext


    public void testCreateSequenceOnClientNoOfferIncluded() throws Exception {
       
        TestSoapClientBinding binding = new TestSoapClientBinding(bus, epr);
        TestClientTransport ct = binding.getClientTransport();
        InputStream is = getClass().getResourceAsStream("resources/spec/CreateSequenceResponse.xml");
        TestInputStreamContext istreamCtx = new TestInputStreamContext();
        istreamCtx.setInputStream(is);
        ct.setInputStreamMessageContext(istreamCtx);
       
        IMocksControl control = EasyMock.createNiceControl();
       
        RMHandler handler = control.createMock(RMHandler.class);
View Full Code Here


   
    public void testCreateSequenceOnClientOfferAccepted() throws Exception {
        TestSoapClientBinding binding = new TestSoapClientBinding(bus, epr);
        TestClientTransport ct = binding.getClientTransport();
        InputStream is = getClass().getResourceAsStream("resources/CreateSequenceResponseOfferAccepted.xml");
        TestInputStreamContext istreamCtx = new TestInputStreamContext();
        istreamCtx.setInputStream(is);
        ct.setInputStreamMessageContext(istreamCtx);
       
        IMocksControl control = EasyMock.createNiceControl();
       
        RMHandler handler = control.createMock(RMHandler.class);
View Full Code Here

   
    public void testCreateSequenceOnClientOfferRejected() throws Exception {
        TestSoapClientBinding binding = new TestSoapClientBinding(bus, epr);
        TestClientTransport ct = binding.getClientTransport();
        InputStream is = getClass().getResourceAsStream("resources/CreateSequenceResponseOfferAccepted.xml");
        TestInputStreamContext istreamCtx = new TestInputStreamContext();
        istreamCtx.setInputStream(is);
        ct.setInputStreamMessageContext(istreamCtx);
       
        IMocksControl control = EasyMock.createNiceControl();
       
        RMHandler handler = control.createMock(RMHandler.class);
View Full Code Here

    public void testSequenceInfoOnClient() throws IOException, WSDLException, SequenceFault {
       
        TestSoapClientBinding binding = new TestSoapClientBinding(bus, epr);
        TestClientTransport ct = binding.getClientTransport();
        InputStream is = getClass().getResourceAsStream("resources/spec/SequenceInfoResponse.xml");
        TestInputStreamContext istreamCtx = new TestInputStreamContext();
        istreamCtx.setInputStream(is);
        ct.setInputStreamMessageContext(istreamCtx);
       
        IMocksControl control = EasyMock.createNiceControl();
        RMHandler handler = control.createMock(RMHandler.class);
        handler.getBinding();
View Full Code Here

        verifyHeaders(context, new String[] {Names.WSRM_ACK_REQUESTED_NAME, Names.WSRM_ACK_REQUESTED_NAME});
    }

    public void testInboundSequence() throws IOException {
        RMSoapHandler codec = new RMSoapHandler();
        TestInputStreamContext istreamCtx = new TestInputStreamContext();
        istreamCtx.setInputStream(RMEndpointTest.class
            .getResourceAsStream("resources/spec/Message1.xml"));
        sb = new SOAPBindingImpl(false);
        ObjectMessageContext objectCtx = new ObjectMessageContextImpl();
        SOAPMessageContext context = (SOAPMessageContext)sb.createBindingMessageContext(objectCtx);
        sb.read(istreamCtx, context);
View Full Code Here

    }

    public void testInboundAcknowledgements() throws IOException {
        RMSoapHandler codec = new RMSoapHandler();
        TestInputStreamContext istreamCtx = new TestInputStreamContext();
        istreamCtx.setInputStream(RMEndpointTest.class
            .getResourceAsStream("resources/spec/Acknowledgment.xml"));
        sb = new SOAPBindingImpl(false);
        ObjectMessageContext objectCtx = new ObjectMessageContextImpl();
        SOAPMessageContext context = (SOAPMessageContext)sb.createBindingMessageContext(objectCtx);
        sb.read(istreamCtx, context);
View Full Code Here

        assertNull(rmps.getAcksRequested());
    }

    public void testInboundAcksRequested() throws IOException {
        RMSoapHandler codec = new RMSoapHandler();
        TestInputStreamContext istreamCtx = new TestInputStreamContext();
        istreamCtx.setInputStream(RMEndpointTest.class
            .getResourceAsStream("resources/spec/Retransmission.xml"));
        sb = new SOAPBindingImpl(false);
        ObjectMessageContext objectCtx = new ObjectMessageContextImpl();
        SOAPMessageContext context = (SOAPMessageContext)sb.createBindingMessageContext(objectCtx);
        sb.read(istreamCtx, context);
View Full Code Here

        QName opName = new QName("http://objectweb.org/hello_world_rpclit", "greetMe");
        QName elName = new QName("http://objectweb.org/hello_world_rpclit", "in");
        String data = new String("TestSOAPInputMessage");
        String str = SOAPMessageUtil.createRPCLitSOAPMessage(opName, elName, data);

        TestInputStreamContext inCtx = new TestInputStreamContext(str.getBytes());
        binding.read(inCtx, soapContext);

        SOAPMessage msg = soapContext.getMessage();
        assertNotNull(msg);
        assertTrue(msg.getSOAPBody().hasChildNodes());
View Full Code Here

                                      new QName("http://objectweb.org/hello_world_soap_http/types",
                                                "sayHi")
                                  });
        TestServerBinding serverBinding = new TestServerBinding(bus, epr, testEndpoint, testEndpoint);
        TestServerTransport serverTransport = new TestServerTransport(bus, epr);       
        TestInputStreamContext inCtx = new TestInputStreamContext(null);
       
        InputStream is = getClass().getResourceAsStream("resources/sayHiDocLiteralReq.xml");
        inCtx.setInputStream(is);

        serverBinding.testDispatch(inCtx, serverTransport);

        assertEquals(1, provider.getInvokeCount());
        assertNotNull(serverTransport.getOutputStreamContext());
View Full Code Here

                                      new QName("http://objectweb.org/hello_world_soap_http/types",
                                                "sayHi")
                                  });
        TestServerBinding serverBinding = new TestServerBinding(bus, epr, testEndpoint, testEndpoint);
        TestServerTransport serverTransport = new TestServerTransport(bus, epr);       
        TestInputStreamContext inCtx = new TestInputStreamContext(null);
       
        InputStream is = getClass().getResourceAsStream("resources/sayHiDocLiteralReq.xml");
        inCtx.setInputStream(is);

        serverBinding.testDispatch(inCtx, serverTransport);

        assertEquals(1, provider.getInvokeCount());
        assertNotNull(serverTransport.getOutputStreamContext());
View Full Code Here

TOP

Related Classes of org.objectweb.celtix.bus.bindings.TestInputStreamContext

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.