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 newActionCallbackwith the givenAction.ActionCallback(URI action) Create a newActionCallbackwith the givenAction.ActionCallback(URI action, AddressingVersion version) Create a newActionCallbackwith the given version andAction.ActionCallback(URI action, AddressingVersion version, URI to) Create a newActionCallbackwith the given version,Action, and optionalTo. -
Method Summary
Modifier and TypeMethodDescriptionvoiddoWithMessage(WebServiceMessage message) Execute any number of operations on the suppliedmessage.Returns theAction.Returns theFaultTo.getFrom()Returns theFrom.Returns the message id strategy used for creating WS-Addressing MessageIds.Returns theReplyTo.protected URIgetTo()Returns theDestinationfor outgoing messages.Returns the WS-Addressing version.voidsetFaultTo(EndpointReference faultTo) Sets theFaultTo.voidsetFrom(EndpointReference from) Sets theFrom.voidsetMessageIdStrategy(MessageIdStrategy messageIdStrategy) Sets the message id strategy used for creating WS-Addressing MessageIds.voidsetReplyTo(EndpointReference replyTo) Sets theReplyTo.voidsetShouldInitializeTo(boolean shouldInitializeTo) Set whether to initialize theToheader by default or not.
-
Constructor Details
-
ActionCallback
Create a newActionCallbackwith the givenAction.The
Toheader of the outgoing message will reflect theconnection URI.The
AddressingVersionis set toAddressing10.- Parameters:
action- the value of the action property to set- Throws:
URISyntaxException
-
ActionCallback
Create a newActionCallbackwith the givenAction.The
Toheader of the outgoing message will reflect theconnection URI.The
AddressingVersionis set toAddressing10.- Parameters:
action- the value of the action property to set
-
ActionCallback
Create a newActionCallbackwith the given version andAction.The
Toheader 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 newActionCallbackwith 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
UuidMessageIdStrategyis used. -
setMessageIdStrategy
Sets the message id strategy used for creating WS-Addressing MessageIds.By default, the
UuidMessageIdStrategyis 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 theDestinationfor outgoing messages.Defaults to the
connection URIif no destination was set. -
setShouldInitializeTo
public void setShouldInitializeTo(boolean shouldInitializeTo) Set whether to initialize theToheader by default or not. -
doWithMessage
Description copied from interface:WebServiceMessageCallbackExecute any number of operations on the suppliedmessage.- Specified by:
doWithMessagein interfaceWebServiceMessageCallback- Parameters:
message- the message- Throws:
IOException- in case of I/O errorsTransformerException- in case of transformation errors
-