public static void fillRequestAddressingHeaders(MessageHeaders headers, Packet packet, AddressingVersion av, SOAPVersion sv, boolean oneway, String action) { fillRequestAddressingHeaders(headers, packet, av, sv, oneway, action, false); } public static void fillRequestAddressingHeaders(MessageHeaders headers, Packet packet, AddressingVersion av, SOAPVersion sv, boolean oneway, String action, boolean mustUnderstand) {
/** * Returns the value of WS-Addressing {@code Action} header. The {@code version} * identifies the WS-Addressing version and the header returned is targeted at * the current implicit role. Caches the value for subsequent invocation. * Duplicate {@code Action} headers are detected earlier. * * @param av WS-Addressing version * @param sv SOAP version * @throws IllegalArgumentException if either {@code av} or {@code sv} is null. * @return Value of WS-Addressing Action header, null if no header is present */ public String getAction(@NotNull AddressingVersion av, @NotNull SOAPVersion sv) { return AddressingUtils.getAction(this, av, sv); }
/** * Returns the value of WS-Addressing {@code FaultTo} header. The {@code version} * identifies the WS-Addressing version and the header returned is targeted at * the current implicit role. Caches the value for subsequent invocation. * Duplicate {@code FaultTo} headers are detected earlier. * * @param av WS-Addressing version * @param sv SOAP version * @throws IllegalArgumentException if either {@code av} or {@code sv} is null. * @return Value of WS-Addressing FaultTo header, null if no header is present */ public WSEndpointReference getFaultTo(@NotNull AddressingVersion av, @NotNull SOAPVersion sv) { return AddressingUtils.getFaultTo(this, av, sv); }
Header replyToFromRequestMsg = AddressingUtils.getFirstHeader(msg.getHeaders(), av.replyToTag, true, sv); Header replyToFromResponseMsg = hl.get(av.toTag, false); boolean replaceToTag = true; replyTo = AddressingUtils.getReplyTo(msg.getHeaders(), av, sv); if (AddressingUtils.getAction(responsePacket.getMessage().getHeaders(), av, sv) == null) { mid = AddressingUtils.getMessageID(msg.getHeaders(), av, sv); refpEPR = AddressingUtils.getFaultTo(msg.getHeaders(), av, sv);
String msgId; try { replyTo = AddressingUtils.getReplyTo(hl, addressingVersion, soapVersion); faultTo = AddressingUtils.getFaultTo(hl, addressingVersion, soapVersion); msgId = AddressingUtils.getMessageID(hl, addressingVersion, soapVersion); } catch (InvalidAddressingHeaderException e) {
private void dumpParam(T param, String method) { if (param instanceof Packet) { Packet message = (Packet)param; String action; String msgId; if (LOGGER.isLoggable(Level.FINE)) { AddressingVersion av = DispatchImpl.this.getBinding().getAddressingVersion(); SOAPVersion sv = DispatchImpl.this.getBinding().getSOAPVersion(); action = av != null && message.getMessage() != null ? AddressingUtils.getAction(message.getMessage().getHeaders(), av, sv) : null; msgId = av != null && message.getMessage() != null ? AddressingUtils.getMessageID(message.getMessage().getHeaders(), av, sv) : null; LOGGER.fine("In DispatchImpl." + method + " for message with action: " + action + " and msg ID: " + msgId + " msg: " + message.getMessage()); if (message.getMessage() == null) { LOGGER.fine("Dispatching null message for action: " + action + " and msg ID: " + msgId); } } } } public final Future<?> invokeAsync(T param, AsyncHandler<T> asyncHandler) {
public static String getTo(MessageHeaders headers, AddressingVersion av, SOAPVersion sv) { if (av == null) { throw new IllegalArgumentException(AddressingMessages.NULL_ADDRESSING_VERSION()); } Header h = getFirstHeader(headers, av.toTag, true, sv); String to; if (h != null) { to = h.getStringContent(); } else { to = av.anonymousUri; } return to; }
/** * Returns the value of WS-Addressing {@code MessageID} header. The {@code version} * identifies the WS-Addressing version and the header returned is targeted at * the current implicit role. Caches the value for subsequent invocation. * Duplicate {@code MessageID} headers are detected earlier. * * @param av WS-Addressing version * @param sv SOAP version * @throws WebServiceException if either {@code av} or {@code sv} is null. * @return Value of WS-Addressing MessageID header, null if no header is present */ public String getMessageID(@NotNull AddressingVersion av, @NotNull SOAPVersion sv) { return AddressingUtils.getMessageID(this, av, sv); }
String action = AddressingUtils.getAction(hl, binding.getAddressingVersion(), binding.getSOAPVersion()); if (action != null) { fillRequestAddressingHeaders(headers, packet, addressingVersion, binding.getSOAPVersion(), oneway, effectiveInputAction, AddressingVersion.isRequired(binding)); } else { fillRequestAddressingHeaders(headers, packet, addressingVersion, binding.getSOAPVersion(), oneWayFeature, oneway, effectiveInputAction);
private static void fillRequestAddressingHeaders(@NotNull MessageHeaders headers, @NotNull Packet packet, @NotNull AddressingVersion av, @NotNull SOAPVersion sv, @NotNull OneWayFeature oneWayFeature, boolean oneway, @NotNull String action) { if (!oneway&&!oneWayFeature.isUseAsyncWithSyncInvoke() && Boolean.TRUE.equals(packet.isSynchronousMEP)) { fillRequestAddressingHeaders(headers, packet, av, sv, oneway, action); } else { fillCommonAddressingHeaders(headers, packet, av, sv, action, false);
/** * Returns the value of WS-Addressing {@code To} header. The {@code version} * identifies the WS-Addressing version and the header returned is targeted at * the current implicit role. Caches the value for subsequent invocation. * Duplicate {@code To} headers are detected earlier. * * @param av WS-Addressing version * @param sv SOAP version * @throws IllegalArgumentException if either {@code av} or {@code sv} is null. * @return Value of WS-Addressing To header, anonymous URI if no header is present */ public String getTo(AddressingVersion av, SOAPVersion sv) { return AddressingUtils.getTo(this, av, sv); }
/** * Returns the value of WS-Addressing {@code ReplyTo} header. The {@code version} * identifies the WS-Addressing version and the header returned is targeted at * the current implicit role. Caches the value for subsequent invocation. * Duplicate {@code ReplyTo} headers are detected earlier. * * @param av WS-Addressing version * @param sv SOAP version * @throws IllegalArgumentException if either {@code av} or {@code sv} is null. * @return Value of WS-Addressing ReplyTo header, null if no header is present */ public WSEndpointReference getReplyTo(@NotNull AddressingVersion av, @NotNull SOAPVersion sv) { return AddressingUtils.getReplyTo(this, av, sv); }
/** * Returns the value of WS-Addressing {@code RelatesTo} header. The {@code version} * identifies the WS-Addressing version and the header returned is targeted at * the current implicit role. Caches the value for subsequent invocation. * Duplicate {@code RelatesTo} headers are detected earlier. * * @param av WS-Addressing version * @param sv SOAP version * @throws WebServiceException if either {@code av} or {@code sv} is null. * @return Value of WS-Addressing RelatesTo header, null if no header is present */ public String getRelatesTo(@NotNull AddressingVersion av, @NotNull SOAPVersion sv) { return AddressingUtils.getRelatesTo(this, av, sv); }
public static void fillRequestAddressingHeaders(MessageHeaders headers, Packet packet, AddressingVersion av, SOAPVersion sv, boolean oneway, String action, boolean mustUnderstand) { fillCommonAddressingHeaders(headers, packet, av, sv, action, mustUnderstand); // wsa:ReplyTo // null or "true" is equivalent to request/response MEP if (!oneway) { WSEndpointReference epr = av.anonymousEpr; if (headers.get(av.replyToTag, false) == null) { headers.add(epr.createHeader(av.replyToTag)); } // wsa:FaultTo if (headers.get(av.faultToTag, false) == null) { headers.add(epr.createHeader(av.faultToTag)); } // wsa:MessageID if (packet.getMessage().getHeaders().get(av.messageIDTag, false) == null) { if (headers.get(av.messageIDTag, false) == null) { Header h = new StringHeader(av.messageIDTag, Message.generateMessageID()); headers.add(h); } } } } // private void fillRequestAddressingHeaders(Packet packet, AddressingVersion av, SOAPVersion sv, OneWayFeature oneWayFeature, boolean oneway, String action);
Header replyToFromRequestMsg = AddressingUtils.getFirstHeader(msg.getHeaders(), av.replyToTag, true, sv); Header replyToFromResponseMsg = hl.get(av.toTag, false); boolean replaceToTag = true; replyTo = AddressingUtils.getReplyTo(msg.getHeaders(), av, sv); if (AddressingUtils.getAction(responsePacket.getMessage().getHeaders(), av, sv) == null) { mid = AddressingUtils.getMessageID(msg.getHeaders(), av, sv); refpEPR = AddressingUtils.getFaultTo(msg.getHeaders(), av, sv);
String msgId; try { replyTo = AddressingUtils.getReplyTo(hl, addressingVersion, soapVersion); faultTo = AddressingUtils.getFaultTo(hl, addressingVersion, soapVersion); msgId = AddressingUtils.getMessageID(hl, addressingVersion, soapVersion); } catch (InvalidAddressingHeaderException e) {
private void dumpParam(T param, String method) { if (param instanceof Packet) { Packet message = (Packet)param; String action; String msgId; if (LOGGER.isLoggable(Level.FINE)) { AddressingVersion av = DispatchImpl.this.getBinding().getAddressingVersion(); SOAPVersion sv = DispatchImpl.this.getBinding().getSOAPVersion(); action = av != null && message.getMessage() != null ? AddressingUtils.getAction(message.getMessage().getHeaders(), av, sv) : null; msgId = av != null && message.getMessage() != null ? AddressingUtils.getMessageID(message.getMessage().getHeaders(), av, sv) : null; LOGGER.fine("In DispatchImpl." + method + " for message with action: " + action + " and msg ID: " + msgId + " msg: " + message.getMessage()); if (message.getMessage() == null) { LOGGER.fine("Dispatching null message for action: " + action + " and msg ID: " + msgId); } } } } public final Future<?> invokeAsync(T param, AsyncHandler<T> asyncHandler) {
public static String getTo(MessageHeaders headers, AddressingVersion av, SOAPVersion sv) { if (av == null) { throw new IllegalArgumentException(AddressingMessages.NULL_ADDRESSING_VERSION()); } Header h = getFirstHeader(headers, av.toTag, true, sv); String to; if (h != null) { to = h.getStringContent(); } else { to = av.anonymousUri; } return to; }
/** * Returns the value of WS-Addressing {@code MessageID} header. The {@code version} * identifies the WS-Addressing version and the header returned is targeted at * the current implicit role. Caches the value for subsequent invocation. * Duplicate {@code MessageID} headers are detected earlier. * * @param av WS-Addressing version * @param sv SOAP version * @throws WebServiceException if either {@code av} or {@code sv} is null. * @return Value of WS-Addressing MessageID header, null if no header is present */ public String getMessageID(@NotNull AddressingVersion av, @NotNull SOAPVersion sv) { return AddressingUtils.getMessageID(this, av, sv); }
String action = AddressingUtils.getAction(hl, binding.getAddressingVersion(), binding.getSOAPVersion()); if (action != null) { fillRequestAddressingHeaders(headers, packet, addressingVersion, binding.getSOAPVersion(), oneway, effectiveInputAction, AddressingVersion.isRequired(binding)); } else { fillRequestAddressingHeaders(headers, packet, addressingVersion, binding.getSOAPVersion(), oneWayFeature, oneway, effectiveInputAction);