public class ActionCallback extends Object implements 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);
Constructor and Description |
---|
ActionCallback(String action)
Create a new
ActionCallback with the given Action . |
ActionCallback(URI action)
Create a new
ActionCallback with the given Action . |
ActionCallback(URI action,
AddressingVersion version)
Create a new
ActionCallback with the given version and Action . |
ActionCallback(URI action,
AddressingVersion version,
URI to)
Create a new
ActionCallback with the given version, Action , and optional
To . |
Modifier and Type | Method and Description |
---|---|
void |
doWithMessage(WebServiceMessage message)
Execute any number of operations on the supplied
message . |
URI |
getAction()
Returns the
Action . |
EndpointReference |
getFaultTo()
Returns the
FaultTo . |
EndpointReference |
getFrom()
Returns the
From . |
MessageIdStrategy |
getMessageIdStrategy()
Returns the message id strategy used for creating WS-Addressing MessageIds.
|
EndpointReference |
getReplyTo()
Returns the
ReplyTo . |
protected URI |
getTo()
Returns the
Destination for outgoing messages. |
AddressingVersion |
getVersion()
Returns the WS-Addressing version
|
void |
setFaultTo(EndpointReference faultTo)
Sets the
FaultTo . |
void |
setFrom(EndpointReference from)
Sets the
From . |
void |
setMessageIdStrategy(MessageIdStrategy messageIdStrategy)
Sets the message id strategy used for creating WS-Addressing MessageIds.
|
void |
setReplyTo(EndpointReference replyTo)
Sets the
ReplyTo . |
public ActionCallback(String action) throws URISyntaxException
ActionCallback
with the given Action
.
The To
header of the outgoing message will reflect the connection URI
.
The AddressingVersion
is set to Addressing10
.
action
- the value of the action property to setURISyntaxException
public ActionCallback(URI action)
ActionCallback
with the given Action
.
The To
header of the outgoing message will reflect the connection URI
.
The AddressingVersion
is set to Addressing10
.
action
- the value of the action property to setpublic ActionCallback(URI action, AddressingVersion version)
ActionCallback
with the given version and Action
.
The To
header of the outgoing message will reflect the connection URI
.
action
- the value of the action property to setversion
- the WS-Addressing version to usepublic ActionCallback(URI action, AddressingVersion version, URI to)
ActionCallback
with the given version, Action
, and optional
To
.action
- the value of the action propertyversion
- the WS-Addressing version to useto
- the value of the destination propertypublic AddressingVersion getVersion()
public MessageIdStrategy getMessageIdStrategy()
By default, the UuidMessageIdStrategy
is used.
public void setMessageIdStrategy(MessageIdStrategy messageIdStrategy)
By default, the UuidMessageIdStrategy
is used.
public URI getAction()
Action
.MessageAddressingProperties.getAction()
public EndpointReference getFrom()
From
.MessageAddressingProperties.getFrom()
public void setFrom(EndpointReference from)
From
.MessageAddressingProperties.getFrom()
public EndpointReference getReplyTo()
ReplyTo
.MessageAddressingProperties.getReplyTo()
public void setReplyTo(EndpointReference replyTo)
ReplyTo
.MessageAddressingProperties.getReplyTo()
public EndpointReference getFaultTo()
FaultTo
.MessageAddressingProperties.getFaultTo()
public void setFaultTo(EndpointReference faultTo)
FaultTo
.MessageAddressingProperties.getFaultTo()
protected URI getTo()
Destination
for outgoing messages.
Defaults to the connection URI
if no
destination was set.
public void doWithMessage(WebServiceMessage message) throws IOException, TransformerException
WebServiceMessageCallback
message
.doWithMessage
in interface WebServiceMessageCallback
message
- the messageIOException
- in case of I/O errorsTransformerException
- in case of transformation errorsCopyright © 2020 Pivotal Software. All rights reserved.