code: public void sendMessage(BaseMessage messageOut, BaseInternalMessageProcessor messageOutProcessor)
      {
          int iErrorCode = this.convertToExternal(messageOut, messageOutProcessor);    // Convert my standard message to the external format for this message
          BaseMessage messageReplyIn = null;
          if (iErrorCode != DBConstants.NORMAL_RETURN)
          {
              String strMessageDescription = this.getTask().getLastError(iErrorCode);
              if ((strMessageDescription == null) || (strMessageDescription.length() == 0))
                  strMessageDescription = "Error converting to external format";
              iErrorCode = this.getTask().setLastError(strMessageDescription);
              messageReplyIn = BaseMessageProcessor.processErrorMessage(this, messageOut, strMessageDescription);
          }
          else
          {
              Utility.getLogger().info("sendMessage externalTrxMessage = " + messageOut);
  
              messageReplyIn = this.sendMessageRequest(messageOut);
          }
          if (messageReplyIn != null)    // No reply if null.
          {
              this.setupReplyMessage(messageReplyIn, messageOut, MessageInfoTypeModel.REPLY, MessageTypeModel.MESSAGE_IN);
              Utility.getLogger().info("externalMessageReply: " + messageReplyIn);
              this.processIncomingMessage(messageReplyIn, messageOut);
          }
      }
docs: Using this transport, send this message (using this processor) and (optionally) process the reply.
  @param internalTrxMessage The message to send.
  @param messageOutProcessor The message out processor.