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.exchange.OutMessage;
    6   import org.codehaus.xfire.fault.XFireFault;
    7   import org.codehaus.xfire.handler.AbstractHandler;
    8   import org.codehaus.xfire.handler.Phase;
    9   import org.codehaus.xfire.soap.SoapSerializer;
    10
    11  public class FaultSoapSerializerHandler
    12      extends AbstractHandler
    13  {
    14      public String getPhase()
    15      {
    16          return Phase.TRANSPORT;
    17      }
    18
    19      /***
    20       * Validates that the mustUnderstand and role headers are processed correctly.
    21       *
    22       * @param context
    23       * @throws XFireFault
    24       */
    25      public void invoke(MessageContext context)
    26          throws Exception
    27      {
    28          OutMessage msg = (OutMessage) context.getExchange().getFaultMessage();
    29          MessageSerializer serializer = msg.getSerializer();
    30
    31          msg.setSerializer(new SoapSerializer(serializer));
    32      }
    33  }