EndpointReferenceType address) throws IOException {
Bus bus = inMessage.getExchange().get(Bus.class);
//this is a response targeting a decoupled endpoint. Treat it as a oneway so
//we don't wait for a response.
inMessage.getExchange().setOneWay(true);
ConduitInitiator conduitInitiator
= bus.getExtension(ConduitInitiatorManager.class)
.getConduitInitiatorForUri(reference.getAddress().getValue());
if (conduitInitiator != null) {
Conduit c = conduitInitiator.getConduit(ei, reference);
// ensure decoupled back channel input stream is closed
c.setMessageObserver(new MessageObserver() {
public void onMessage(Message m) {
InputStream is = m.getContent(InputStream.class);
if (is != null) {