code: public ExternalMessage createExternalMessage(BaseMessage message, Object rawData)
      {
          ExternalMessage externalTrxMessageOut = super.createExternalMessage(message, rawData);
          if (externalTrxMessageOut == null)
          {
              if (MessageTypeModel.MESSAGE_IN.equalsIgnoreCase((String)message.get(TrxMessageHeader.MESSAGE_PROCESS_TYPE)))
                  externalTrxMessageOut = new XmlTrxMessageIn(message, rawData);
              else
                  externalTrxMessageOut = new XmlTrxMessageOut(message, rawData);
          }
          return externalTrxMessageOut;
      }
docs: Get the external message container for this Internal message.
  Typically, the overriding class supplies a default format for the transport type.
  <br/>NOTE: The message header from the internal message is copies, but not the message itself.
  @param The internalTrxMessage that I will convert to this external format.
  @return The (empty) External message.