Class ActionCallback
java.lang.Object
org.springframework.ws.soap.addressing.client.ActionCallback
- All Implemented Interfaces:
WebServiceMessageCallback
WebServiceMessageCallback
implementation that sets the WS-Addressing
Action
header on the message.
A usage example with WebServiceTemplate
:
WebServiceTemplate template = new WebServiceTemplate(messageFactory); Result result = new DOMResult(); template.sendSourceAndReceiveToResult(new StringSource("<content xmlns=\"http://tempuri.org\"/>"), new ActionCallback(new URI("http://tempuri.org/Action")), result);
- Since:
- 1.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionActionCallback
(String action) Create a newActionCallback
with the givenAction
.ActionCallback
(URI action) Create a newActionCallback
with the givenAction
.ActionCallback
(URI action, AddressingVersion version) Create a newActionCallback
with the given version andAction
.ActionCallback
(URI action, AddressingVersion version, @Nullable URI to) Create a newActionCallback
with the given version,Action
, and optionalTo
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
doWithMessage
(WebServiceMessage message) Execute any number of operations on the suppliedmessage
.Returns theAction
.@Nullable EndpointReference
Returns theFaultTo
.@Nullable EndpointReference
getFrom()
Returns theFrom
.Returns the message id strategy used for creating WS-Addressing MessageIds.@Nullable EndpointReference
Returns theReplyTo
.protected @Nullable URI
getTo()
Returns theDestination
for outgoing messages.Returns the WS-Addressing version.void
setFaultTo
(EndpointReference faultTo) Sets theFaultTo
.void
setFrom
(EndpointReference from) Sets theFrom
.void
setMessageIdStrategy
(MessageIdStrategy messageIdStrategy) Sets the message id strategy used for creating WS-Addressing MessageIds.void
setReplyTo
(EndpointReference replyTo) Sets theReplyTo
.void
setShouldInitializeTo
(boolean shouldInitializeTo) Set whether to initialize theTo
header by default or not.
-
Constructor Details
-
ActionCallback
Create a newActionCallback
with the givenAction
.The
To
header of the outgoing message will reflect theconnection URI
.The
AddressingVersion
is set toAddressing10
.- Parameters:
action
- the value of the action property to set- Throws:
URISyntaxException
-
ActionCallback
Create a newActionCallback
with the givenAction
.The
To
header of the outgoing message will reflect theconnection URI
.The
AddressingVersion
is set toAddressing10
.- Parameters:
action
- the value of the action property to set
-
ActionCallback
Create a newActionCallback
with the given version andAction
.The
To
header of the outgoing message will reflect theconnection URI
.- Parameters:
action
- the value of the action property to setversion
- the WS-Addressing version to use
-
ActionCallback
Create a newActionCallback
with the given version,Action
, and optionalTo
.- Parameters:
action
- the value of the action propertyversion
- the WS-Addressing version to useto
- the value of the destination property
-
-
Method Details
-
getVersion
Returns the WS-Addressing version. -
getMessageIdStrategy
Returns the message id strategy used for creating WS-Addressing MessageIds.By default, the
UuidMessageIdStrategy
is used. -
setMessageIdStrategy
Sets the message id strategy used for creating WS-Addressing MessageIds.By default, the
UuidMessageIdStrategy
is used. -
getAction
Returns theAction
.- See Also:
-
getFrom
Returns theFrom
.- See Also:
-
setFrom
Sets theFrom
.- See Also:
-
getReplyTo
Returns theReplyTo
.- See Also:
-
setReplyTo
Sets theReplyTo
.- See Also:
-
getFaultTo
Returns theFaultTo
.- See Also:
-
setFaultTo
Sets theFaultTo
.- See Also:
-
getTo
Returns theDestination
for outgoing messages.Defaults to the
connection URI
if no destination was set. -
setShouldInitializeTo
public void setShouldInitializeTo(boolean shouldInitializeTo) Set whether to initialize theTo
header by default or not. -
doWithMessage
Description copied from interface:WebServiceMessageCallback
Execute any number of operations on the suppliedmessage
.- Specified by:
doWithMessage
in interfaceWebServiceMessageCallback
- Parameters:
message
- the message- Throws:
IOException
- in case of I/O errorsTransformerException
- in case of transformation errors
-