Search in sources :

Example 56 with Conduit

use of org.apache.cxf.transport.Conduit in project cxf by apache.

the class NettyHttpDestinationTest method testGetBackChannelSendFault.

@Test
public void testGetBackChannelSendFault() throws Exception {
    destination = setUpDestination(false, false);
    setUpDoService(false, true, 500);
    destination.doService(request, response);
    setUpInMessage();
    Conduit backChannel = destination.getBackChannel(inMessage);
    outMessage = setUpOutMessage();
    backChannel.prepare(outMessage);
    verifyBackChannelSend(backChannel, outMessage, 500);
}
Also used : Conduit(org.apache.cxf.transport.Conduit) Test(org.junit.Test)

Example 57 with Conduit

use of org.apache.cxf.transport.Conduit in project cxf by apache.

the class NettyHttpDestinationTest method testGetBackChannelSendOneway.

@Test
public void testGetBackChannelSendOneway() throws Exception {
    destination = setUpDestination(false, false);
    setUpDoService(false, true, 500);
    destination.doService(request, response);
    setUpInMessage();
    Conduit backChannel = destination.getBackChannel(inMessage);
    outMessage = setUpOutMessage();
    backChannel.prepare(outMessage);
    verifyBackChannelSend(backChannel, outMessage, 500, true);
}
Also used : Conduit(org.apache.cxf.transport.Conduit) Test(org.junit.Test)

Example 58 with Conduit

use of org.apache.cxf.transport.Conduit in project cxf by apache.

the class NettyHttpDestinationTest method testGetAnonBackChannel.

@Test
public void testGetAnonBackChannel() throws Exception {
    destination = setUpDestination(false, false);
    setUpDoService(false);
    destination.doService(request, response);
    setUpInMessage();
    Conduit backChannel = destination.getBackChannel(inMessage);
    assertNotNull("expected back channel", backChannel);
    assertEquals("unexpected target", EndpointReferenceUtils.ANONYMOUS_ADDRESS, backChannel.getTarget().getAddress().getValue());
}
Also used : Conduit(org.apache.cxf.transport.Conduit) Test(org.junit.Test)

Example 59 with Conduit

use of org.apache.cxf.transport.Conduit in project cxf by apache.

the class NettyHttpDestinationTest method testGetBackChannelSend.

@Test
public void testGetBackChannelSend() throws Exception {
    destination = setUpDestination(false, false);
    setUpDoService(false, true);
    destination.doService(request, response);
    setUpInMessage();
    Conduit backChannel = destination.getBackChannel(inMessage);
    outMessage = setUpOutMessage();
    backChannel.prepare(outMessage);
    verifyBackChannelSend(backChannel, outMessage, 200);
}
Also used : Conduit(org.apache.cxf.transport.Conduit) Test(org.junit.Test)

Example 60 with Conduit

use of org.apache.cxf.transport.Conduit in project cxf by apache.

the class UndertowHTTPDestinationTest method testGetBackChannelSend.

@Test
public void testGetBackChannelSend() throws Exception {
    destination = setUpDestination(false, false);
    setUpDoService(false, true);
    destination.doService(request, response);
    setUpInMessage();
    Conduit backChannel = destination.getBackChannel(inMessage);
    outMessage = setUpOutMessage();
    backChannel.prepare(outMessage);
    verifyBackChannelSend(backChannel, outMessage, 200);
}
Also used : Conduit(org.apache.cxf.transport.Conduit) Test(org.junit.Test)

Aggregations

Conduit (org.apache.cxf.transport.Conduit)83 Test (org.junit.Test)36 Message (org.apache.cxf.message.Message)35 EndpointInfo (org.apache.cxf.service.model.EndpointInfo)30 Exchange (org.apache.cxf.message.Exchange)28 IOException (java.io.IOException)18 MessageImpl (org.apache.cxf.message.MessageImpl)17 Endpoint (org.apache.cxf.endpoint.Endpoint)16 ExchangeImpl (org.apache.cxf.message.ExchangeImpl)13 MessageObserver (org.apache.cxf.transport.MessageObserver)12 EndpointReferenceType (org.apache.cxf.ws.addressing.EndpointReferenceType)12 OutputStream (java.io.OutputStream)11 Bus (org.apache.cxf.Bus)11 Destination (org.apache.cxf.transport.Destination)11 ConduitInitiator (org.apache.cxf.transport.ConduitInitiator)10 InputStream (java.io.InputStream)9 BindingOperationInfo (org.apache.cxf.service.model.BindingOperationInfo)9 ConduitInitiatorManager (org.apache.cxf.transport.ConduitInitiatorManager)8 ByteArrayOutputStream (java.io.ByteArrayOutputStream)7 ByteArrayInputStream (java.io.ByteArrayInputStream)6