code: public Object processMessage(Object message)
      {
          Utility.getLogger().info("processMessage called in service message");
          BaseMessage msgReplyInternal = null;
          try {
              BaseMessage messageIn = new TreeMessage(null, null);
              new ServiceTrxMessageIn(messageIn, message);
  
              msgReplyInternal = this.processIncomingMessage(messageIn, null);
              Utility.getLogger().info("msgReplyInternal: " + msgReplyInternal);
  
              int iErrorCode = this.convertToExternal(msgReplyInternal, null);
              Utility.getLogger().info("externalMessageReply: " + msgReplyInternal);
              Object msg = null;//fac.createMessage();
  
              if (iErrorCode == DBConstants.NORMAL_RETURN)
              {
                  msg = msgReplyInternal.getExternalMessage().getRawData();
                  String strTrxID = (String)msgReplyInternal.getMessageHeader().get(TrxMessageHeader.LOG_TRX_ID);
                  this.logMessage(strTrxID, msgReplyInternal, MessageInfoTypeModel.REPLY, MessageTypeModel.MESSAGE_OUT, MessageStatusModel.SENTOK, null, null);    // Sent (no reply required)
              }
  
              return msg;
          } catch (Throwable ex)  {
              ex.printStackTrace();
              String strError = "Error in processing or replying to a message";
              Utility.getLogger().warning(strError);
              if (msgReplyInternal != null)
              {
                  String strTrxID = (String)msgReplyInternal.getMessageHeader().get(TrxMessageHeader.LOG_TRX_ID);
                  this.logMessage(strTrxID, msgReplyInternal, MessageInfoTypeModel.REPLY, MessageTypeModel.MESSAGE_OUT, MessageStatusModel.ERROR, strError, null);
              }
              return null;
          }
      }
docs: This is the application code for handling the message.. Once the
  message is received the application can retrieve the soap part, the
  attachment part if there are any, or any other information from the
  message.
  @param message The incoming message to process.