Spring Web Services Framework

org.springframework.ws.soap.addressing.client
Class ActionCallback

java.lang.Object
  extended by org.springframework.ws.soap.addressing.client.ActionCallback
All Implemented Interfaces:
WebServiceMessageCallback

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);
 

Since:
1.0.0
Author:
Arjen Poutsma

Constructor Summary
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.
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActionCallback

public ActionCallback(String action)
               throws URISyntaxException
Create a new ActionCallback with the given Action.

The To header of the outgoing message will reflect the connection URI.

The AddressingVersion is set to Addressing10.

Parameters:
action - the value of the action property to set
Throws:
URISyntaxException

ActionCallback

public ActionCallback(URI action)
Create a new ActionCallback with the given Action.

The To header of the outgoing message will reflect the connection URI.

The AddressingVersion is set to Addressing10.

Parameters:
action - the value of the action property to set

ActionCallback

public ActionCallback(URI action,
                      AddressingVersion version)
Create a new ActionCallback with the given version and Action.

The To header of the outgoing message will reflect the connection URI.

Parameters:
action - the value of the action property to set
version - the WS-Addressing version to use

ActionCallback

public ActionCallback(URI action,
                      AddressingVersion version,
                      URI to)
Create a new ActionCallback with the given version, Action, and optional To.

Parameters:
action - the value of the action property
version - the WS-Addressing version to use
action - the value of the destination property
Method Detail

getVersion

public AddressingVersion getVersion()
Returns the WS-Addressing version

Returns:

getMessageIdStrategy

public MessageIdStrategy getMessageIdStrategy()
Returns the message id strategy used for creating WS-Addressing MessageIds.

By default, the UuidMessageIdStrategy is used.


setMessageIdStrategy

public void setMessageIdStrategy(MessageIdStrategy messageIdStrategy)
Sets the message id strategy used for creating WS-Addressing MessageIds.

By default, the UuidMessageIdStrategy is used.


getAction

public URI getAction()
Returns the Action.

See Also:
MessageAddressingProperties.getAction()

getFrom

public EndpointReference getFrom()
Returns the From.

See Also:
MessageAddressingProperties.getFrom()

setFrom

public void setFrom(EndpointReference from)
Sets the From.

See Also:
MessageAddressingProperties.getFrom()

getReplyTo

public EndpointReference getReplyTo()
Returns the ReplyTo.

See Also:
MessageAddressingProperties.getReplyTo()

setReplyTo

public void setReplyTo(EndpointReference replyTo)
Sets the ReplyTo.

See Also:
MessageAddressingProperties.getReplyTo()

getFaultTo

public EndpointReference getFaultTo()
Returns the FaultTo.

See Also:
MessageAddressingProperties.getFaultTo()

setFaultTo

public void setFaultTo(EndpointReference faultTo)
Sets the FaultTo.

See Also:
MessageAddressingProperties.getFaultTo()

getTo

protected URI getTo()
Returns the Destination for outgoing messages.

Defaults to the connection URI if no destination was set.


doWithMessage

public void doWithMessage(WebServiceMessage message)
                   throws IOException,
                          TransformerException
Description copied from interface: WebServiceMessageCallback
Execute any number of operations on the supplied message.

Specified by:
doWithMessage in interface WebServiceMessageCallback
Parameters:
message - the message
Throws:
IOException - in case of I/O errors
TransformerException - in case of transformation errors

Spring Web Services Framework

Copyright © 2005-2013 The Spring Web Services Framework. All Rights Reserved.