View Javadoc

    1   package org.codehaus.xfire.soap.handler;
    2
    3   import org.codehaus.xfire.MessageContext;
    4   import org.codehaus.xfire.exchange.MessageSerializer;
    5   import org.codehaus.xfire.fault.XFireFault;
    6   import org.codehaus.xfire.handler.AbstractHandler;
    7   import org.codehaus.xfire.handler.Phase;
    8   import org.codehaus.xfire.soap.SoapSerializer;
    9
    10  public class SoapSerializerHandler
    11      extends AbstractHandler
    12  {
    13      public String getPhase()
    14      {
    15          return Phase.TRANSPORT;
    16      }
    17
    18      /***
    19       * Validates that the mustUnderstand and role headers are processed correctly.
    20       *
    21       * @param context
    22       * @throws XFireFault
    23       */
    24      public void invoke(MessageContext context)
    25          throws Exception
    26      {
    27          MessageSerializer serializer = context.getOutMessage().getSerializer();
    28
    29          context.getOutMessage().setSerializer(new SoapSerializer(serializer));
    30      }
    31  }