diff --git a/core/src/main/java/org/springframework/ws/soap/addressing/server/AbstractAddressingEndpointMapping.java b/core/src/main/java/org/springframework/ws/soap/addressing/server/AbstractAddressingEndpointMapping.java
index 208c0e87..28a3dc4b 100644
--- a/core/src/main/java/org/springframework/ws/soap/addressing/server/AbstractAddressingEndpointMapping.java
+++ b/core/src/main/java/org/springframework/ws/soap/addressing/server/AbstractAddressingEndpointMapping.java
@@ -126,11 +126,10 @@ public abstract class AbstractAddressingEndpointMapping extends TransformerObjec
public final void setOrder(int order) {
this.order = order;
}
-
- /**
- * Set additional interceptors to be applied before the implicit WS-Addressing interceptor, e.g.
- * XwsSecurityInterceptor.
+ /**
+ * Set additional interceptors to be applied before the implicit WS-Addressing interceptor, e.g.
+ * XwsSecurityInterceptor.
*/
public final void setPreInterceptors(EndpointInterceptor[] preInterceptors) {
Assert.notNull(preInterceptors, "'preInterceptors' must not be null");
@@ -156,15 +155,50 @@ public abstract class AbstractAddressingEndpointMapping extends TransformerObjec
this.messageIdStrategy = messageIdStrategy;
}
- public final void setMessageSenders(WebServiceMessageSender[] messageSenders) {
- Assert.notNull(messageSenders, "'messageSenders' must not be null");
- this.messageSenders = messageSenders;
+ /**
+ * Returns the message id strategy used for creating WS-Addressing MessageIds.
+ */
+ public MessageIdStrategy getMessageIdStrategy() {
+ return messageIdStrategy;
+ }
+
+ /**
+ * Sets a single message senders, which is used to send out-of-band reply messages. If a
+ * request messages defines a non-anonymous reply address, this senders will be used to
+ * send the message.
+ *
+ * @param messageSender the message sender
+ */
+ public final void setMessageSender(WebServiceMessageSender messageSender) {
+ Assert.notNull(messageSender, "'messageSender' must not be null");
+ setMessageSenders(new WebServiceMessageSender[]{messageSender});
+ }
+
+ /**
+ * Sets the message senders, which are used to send out-of-band reply messages.
+ * If a request messages defines a non-anonymous reply address, these senders will be
+ * used to send the message.
+ *
+ * @param messageSenders the message senders
+ */
+ public final void setMessageSenders(WebServiceMessageSender[] messageSenders) {
+ Assert.notNull(messageSenders, "'messageSenders' must not be null");
+ this.messageSenders = messageSenders;
}
- /**
- * Sets the WS-Addressing versions to be supported by this mapping.
- *
null if no specific
- * one is found. This template method is called by {@link #getEndpoint(MessageContext)}.
- *
+ /**
+ * Returns the message senders for the given endpoint. Default implementation returns
+ * {@link #getMessageSenders()}
+ *
+ * @param endpoint the endpoint
+ * @return the message senders for the given endpoint
+ */
+ protected WebServiceMessageSender[] getMessageSenders(Object endpoint) {
+ return getMessageSenders();
+ }
+
+ /**
+ * Returns the message ID strategy for the given endpoint. Default implementation
+ * returns {@link #getMessageIdStrategy()}
+ *
+ * @param endpoint the endpoint
+ * @return the message ID strategy for the given endpoint
+ */
+ protected MessageIdStrategy getMessageIdStrategy(Object endpoint) {
+ return getMessageIdStrategy();
+ }
+
+ /**
+ * Lookup an endpoint for the given {@link MessageAddressingProperties}, returning null if no specific
+ * one is found. This template method is called by {@link #getEndpoint(MessageContext)}.
+ *
* @param map the message addressing properties
* @return the endpoint, or null
*/