View Javadoc

    1   package org.codehaus.xfire.handler;
    2
    3   import org.codehaus.xfire.MessageContext;
    4   import org.codehaus.xfire.XFireException;
    5   import org.codehaus.xfire.fault.XFireFault;
    6
    7   /***
    8    * Sends messages out via the out channel on the message exchange.
    9    *
    10   * @author <a href="mailto:dan@envoisolutions.com">Dan Diephouse</a>
    11   */
    12  public class OutMessageSender
    13      extends AbstractHandler
    14  {
    15      public String getPhase()
    16      {
    17          return Phase.SEND;
    18      }
    19
    20      public void invoke(MessageContext context)
    21          throws XFireFault
    22      {
    23          try
    24          {
    25              context.getOutMessage().getChannel().send(context, context.getOutMessage());
    26          }
    27          catch (XFireException e)
    28          {
    29              throw XFireFault.createFault(e);
    30          }
    31      }
    32  }