// add request-specific MAPs
boolean isOneway = ContextUtils.isOneway(context);
// 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)) {
try {
replyTo = clientTransport == null ? null : clientTransport.getDecoupledEndpoint();
} catch (IOException ex) {
// ignore
replyTo = null;
}
if (replyTo == null || isOneway) {
AttributedURIType address =
ContextUtils.getAttributedURI(isOneway
? Names.WSA_NONE_ADDRESS
: Names.WSA_ANONYMOUS_ADDRESS);
replyTo =
ContextUtils.WSA_OBJECT_FACTORY.createEndpointReferenceType();
replyTo.setAddress(address);
}
maps.setReplyTo(replyTo);
}
if (!isOneway) {
// REVISIT FaultTo if cached by transport in context