Package org.apache.cxf.transport

Examples of org.apache.cxf.transport.Conduit.send()


                    + "start=\"<soap.xml@xfire.codehaus.org>\"; "
                    + "start-info=\"text/xml; charset=utf-8\"; "
                    + "boundary=\"----=_Part_4_701508.1145579811786\"";

        m.put(Message.CONTENT_TYPE, ct);
        conduit.send(m);

        OutputStream os = m.getContent(OutputStream.class);
        InputStream is = getResourceAsStream("request");
        if (is == null) {
            throw new RuntimeException("Could not find resource " + "request");
View Full Code Here


        destination.doService(request, response);
        setUpInMessage();
        Conduit backChannel =
            destination.getBackChannel(inMessage, null, null);
        outMessage = setUpOutMessage();
        backChannel.send(outMessage);
        verifyBackChannelSend(backChannel, outMessage, 200);
    }

    public void testGetBackChannelSendFault() throws Exception {
        destination = setUpDestination(false);
View Full Code Here

        destination.doService(request, response);
        setUpInMessage();
        Conduit backChannel =
            destination.getBackChannel(inMessage, null, null);
        outMessage = setUpOutMessage();
        backChannel.send(outMessage);
        verifyBackChannelSend(backChannel, outMessage, 500);
    }
   
    public void testGetBackChannelSendOneway() throws Exception {
        destination = setUpDestination(false);
View Full Code Here

        destination.doService(request, response);
        setUpInMessage();
        Conduit backChannel =
            destination.getBackChannel(inMessage, null, null);
        outMessage = setUpOutMessage();
        backChannel.send(outMessage);
        verifyBackChannelSend(backChannel, outMessage, 500, true);
    }

    public void testGetBackChannelSendDecoupled() throws Exception {
        destination = setUpDestination(false);
View Full Code Here

        Conduit partialBackChannel =
            destination.getBackChannel(inMessage, partialResponse, replyTo);
        assertEquals("unexpected response code",
                     202,
                     partialResponse.get(Message.RESPONSE_CODE));
        partialBackChannel.send(partialResponse);
        verifyBackChannelSend(partialBackChannel, partialResponse, 202);

        outMessage = setUpOutMessage();
        Conduit fullBackChannel =
            destination.getBackChannel(inMessage, null, replyTo);
View Full Code Here

        Conduit fullBackChannel =
            destination.getBackChannel(inMessage, null, replyTo);
        assertSame("unexpected back channel",
                   fullBackChannel,
                   decoupledBackChannel);
        fullBackChannel.send(outMessage);
    }
   
    private JettyHTTPDestination setUpDestination()
        throws Exception {
        return setUpDestination(false);
View Full Code Here

            messages.get(i).getExchange();
            EasyMock.expectLastCall().andReturn(ex);
            Conduit conduit = createMock(Conduit.class);
            ex.getConduit();
            EasyMock.expectLastCall().andReturn(conduit);
            conduit.send(messages.get(i));
            EasyMock.expectLastCall();
            OutputStream os = createMock(OutputStream.class);
            messages.get(i).getContent(OutputStream.class);
            EasyMock.expectLastCall().andReturn(os).times(2);
            ByteArrayOutputStream saved = createMock(ByteArrayOutputStream.class);
View Full Code Here

        TestMessageObserver obs = new TestMessageObserver();
        conduit.setMessageObserver(obs);
       
        Message m = new MessageImpl();
        conduit.send(m);

        OutputStream os = m.getContent(OutputStream.class);
        InputStream is = getResourceAsStream(message);
        if (is == null) {
            throw new RuntimeException("Could not find resource " + message);
View Full Code Here

        public void onMessage(Message message) {
            try {
                Conduit backChannel = message.getDestination().getBackChannel(message, null, null);

                backChannel.send(message);

                OutputStream out = message.getContent(OutputStream.class);
                assertNotNull(out);
                InputStream in = message.getContent(InputStream.class);
                assertNotNull(in);
View Full Code Here

              : exchange.getOutMessage() != null
                ? OutgoingChainInterceptor.getBackChannelConduit(exchange)
                : null;

        try {
            conduit.send(message);

            if (message.getInterceptorChain().doIntercept(message)) {
                conduit.close(message);
            } else {
                if (message.getContent(Exception.class) != null) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.