Exchange exchange = message.getExchange();
// add request-specific MAPs
boolean isOneway = exchange.isOneWay();
boolean isOutbound = ContextUtils.isOutbound(message);
Conduit conduit = null;
// To
if (maps.getTo() == null) {
if (isOutbound) {
conduit = ContextUtils.getConduit(conduit, message);
}
EndpointReferenceType reference = conduit != null
? conduit.getTarget()
: ContextUtils.getNoneEndpointReference();
maps.setTo(reference);
}
// ReplyTo, set if null in MAPs or if set to a generic address
// (anonymous or none) that may not be appropriate for the
// current invocation
EndpointReferenceType replyTo = maps.getReplyTo();
if (ContextUtils.isGenericAddress(replyTo)) {
conduit = ContextUtils.getConduit(conduit, message);
if (conduit != null) {
Destination backChannel = conduit.getBackChannel();
if (backChannel != null) {
replyTo = backChannel.getAddress();
}
}
if (replyTo == null