View Javadoc

    1   package org.codehaus.xfire.soap;
    2
    3   import org.codehaus.xfire.handler.Handler;
    4   import org.codehaus.xfire.soap.handler.FaultSoapSerializerHandler;
    5   import org.codehaus.xfire.soap.handler.ReadHeadersHandler;
    6   import org.codehaus.xfire.soap.handler.SoapSerializerHandler;
    7   import org.codehaus.xfire.soap.handler.ValidateHeadersHandler;
    8   import org.codehaus.xfire.transport.AbstractTransport;
    9   import org.codehaus.xfire.transport.Transport;
    10
    11  /***
    12   * Provides soap messaging support to a channel by adding the SOAP handlers.
    13   *
    14   * @see org.codehaus.xfire.soap.handler.ReadHeadersHandler
    15   * @see org.codehaus.xfire.soap.handler.ValidateHeadersHandler
    16   * @author <a href="mailto:dan@envoisolutions.com">Dan Diephouse</a>
    17   */
    18  public class SoapTransport
    19  {
    20      private static final Handler readHeaders = new ReadHeadersHandler();
    21      private static final Handler validate = new ValidateHeadersHandler();
    22      private static final Handler serializer = new SoapSerializerHandler();
    23      private static final Handler faultSerializer = new FaultSoapSerializerHandler();
    24
    25      public static Transport createSoapTransport(AbstractTransport transport)
    26      {
    27          transport.addInHandler(readHeaders);
    28          transport.addInHandler(validate);
    29
    30          transport.addOutHandler(serializer);
    31          transport.addFaultHandler(faultSerializer);
    32
    33          return transport;
    34      }
    35  }