docs: public String getMessageCode(BaseMessage externalMessage)
      {
          if (!(externalMessage.getExternalMessage() instanceof XmlTrxMessageIn))
              return null;
          if (!(externalMessage.getExternalMessage().getRawData() instanceof String))
              return null;
          String strXML = (String)externalMessage.getExternalMessage().getRawData();
          int beginIndex = 0;
          while (beginIndex != -1)
          {
              beginIndex = strXML.indexOf('<', beginIndex);
              if (beginIndex == -1)
                  return null;    // No type found.
              beginIndex++;
              if (strXML.charAt(beginIndex) == '?')
                  continue;   // XML Directive
              int iEnd = strXML.indexOf(' ', beginIndex);
              int iClose = strXML.indexOf('>', beginIndex);
              if ((iEnd != -1) && (iClose != -1))
              	iEnd = Math.min(iEnd, iClose);
              else if (iEnd == -1)
                  iEnd = iClose;
              if (iEnd != -1)
              {
                  String code = strXML.substring(beginIndex, iEnd);
                  if (code.indexOf(':') != -1)
                  	code = code.substring(code.indexOf(':') + 1);	// Remove namespace prefix
                  return code;
              }
              break;  // Not found
          }
          return null;    // No type found.
      }