Skip to content

Commit 37bd3e9

Browse files
committed
SWS-537 - Add getters to WS-A ActionCallback
1 parent 80b81b4 commit 37bd3e9

File tree

1 file changed

+66
-3
lines changed

1 file changed

+66
-3
lines changed

core/src/main/java/org/springframework/ws/soap/addressing/client/ActionCallback.java

Lines changed: 66 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,24 @@ public ActionCallback(URI action, AddressingVersion version, URI to) {
132132
}
133133
}
134134

135+
/**
136+
* Returns the WS-Addressing version
137+
* @return
138+
*/
139+
public AddressingVersion getVersion() {
140+
return version;
141+
}
142+
143+
/**
144+
* Returns the message id strategy used for creating WS-Addressing MessageIds.
145+
* <p/>
146+
* By default, the {@link UuidMessageIdStrategy} is used on Java 5 and higher, and the {@link
147+
* RandomGuidMessageIdStrategy} on Java 1.4.
148+
*/
149+
public MessageIdStrategy getMessageIdStrategy() {
150+
return messageIdStrategy;
151+
}
152+
135153
/**
136154
* Sets the message id strategy used for creating WS-Addressing MessageIds.
137155
* <p/>
@@ -143,18 +161,64 @@ public void setMessageIdStrategy(MessageIdStrategy messageIdStrategy) {
143161
this.messageIdStrategy = messageIdStrategy;
144162
}
145163

164+
/**
165+
* Returns the {@code Action}.
166+
* @see org.springframework.ws.soap.addressing.core.MessageAddressingProperties#getAction()
167+
*/
168+
public URI getAction() {
169+
return action;
170+
}
171+
172+
/**
173+
* Returns the {@code From}.
174+
* @see org.springframework.ws.soap.addressing.core.MessageAddressingProperties#getFrom()
175+
*/
176+
public EndpointReference getFrom() {
177+
return from;
178+
}
179+
180+
/**
181+
* Sets the {@code From}.
182+
* @see org.springframework.ws.soap.addressing.core.MessageAddressingProperties#getFrom()
183+
*/
146184
public void setFrom(EndpointReference from) {
147185
this.from = from;
148186
}
149187

188+
/**
189+
* Returns the {@code ReplyTo}.
190+
* @see org.springframework.ws.soap.addressing.core.MessageAddressingProperties#getReplyTo()
191+
*/
192+
public EndpointReference getReplyTo() {
193+
return replyTo;
194+
}
195+
196+
/**
197+
* Sets the {@code ReplyTo}.
198+
* @see org.springframework.ws.soap.addressing.core.MessageAddressingProperties#getReplyTo()
199+
*/
150200
public void setReplyTo(EndpointReference replyTo) {
151201
this.replyTo = replyTo;
152202
}
153203

204+
/**
205+
* Returns the {@code FaultTo}.
206+
* @see org.springframework.ws.soap.addressing.core.MessageAddressingProperties#getFaultTo()
207+
*/
208+
public EndpointReference getFaultTo() {
209+
return faultTo;
210+
}
211+
212+
/**
213+
* Sets the {@code FaultTo}.
214+
* @see org.springframework.ws.soap.addressing.core.MessageAddressingProperties#getFaultTo()
215+
*/
154216
public void setFaultTo(EndpointReference faultTo) {
155217
this.faultTo = faultTo;
156218
}
157219

220+
221+
158222
/**
159223
* Returns the <code>Destination</code> for outgoing messages.
160224
* <p/>
@@ -182,10 +246,9 @@ protected URI getTo() {
182246
public void doWithMessage(WebServiceMessage message) throws IOException, TransformerException {
183247
Assert.isInstanceOf(SoapMessage.class, message);
184248
SoapMessage soapMessage = (SoapMessage) message;
185-
URI to = getTo();
186-
URI messageId = messageIdStrategy.newMessageId(soapMessage);
249+
URI messageId = getMessageIdStrategy().newMessageId(soapMessage);
187250
MessageAddressingProperties map =
188-
new MessageAddressingProperties(to, from, replyTo, faultTo, action, messageId);
251+
new MessageAddressingProperties(getTo(), getFrom(), getReplyTo(), getFaultTo(), getAction(), messageId);
189252
version.addAddressingHeaders(soapMessage, map);
190253
}
191254

0 commit comments

Comments
 (0)