+

Search Tips | Advanced Search

Ping MFT agent request message format

We can ping an agent by issuing an ftePingAgent command or by putting an XML message on the agent command queue. The ping agent request XML must conform to the PingAgent.xsd schema. After you have installed Managed File Transfer, we can find the PingAgent.xsd schema file in the following directory: MQ_INSTALLATION_PATH/mqft/samples/schema. The PingAgent.xsd schema imports fteutils.xsd, which is in the same directory.

When the agent receives a ping agent request message on its command queue, if the agent is active, it returns an XML response message to the command or application that put the ping agent request message on the command queue. The response message from the agent is in the format defined by Reply.xsd. For more information about this format, see MFT agent reply message format.


Schema

The following schema describes which elements are valid in an ping agent request XML message.

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            xmlns="http://www.ibm.com/xmlns/wmqfte/7.0.1/PingAgent"
            targetNamespace="http://www.ibm.com/xmlns/wmqfte/7.0.1/PingAgent">

    <xsd:include schemaLocation="fteutils.xsd"/>

    <xsd:element name="pingAgent">
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element name="originator" type="origRequestType" maxOccurs="1" minOccurs="1"/>
                <xsd:element name="agent"      type="agentType"       maxOccurs="1" minOccurs="1"/>
                <xsd:element name="reply"      type="replyType"       maxOccurs="1" minOccurs="0" />
            </xsd:sequence>
            <xsd:attribute name="version" type="versionType" use="required" />
        </xsd:complexType>
    </xsd:element> 

</xsd:schema>


Understand the ping agent request message

The elements and attributes used in the ping agent request messages are described in the following list:

    <pingAgent>
    Group element containing all the elements required to specify a ping agent request.

    <originator>
    Group element containing all the elements required to specify the originator of the ping request.

      <hostName>
      The host name of the machine where the request originated.

      <userID>
      The user name of the originator of the request.

      <mqmdUserID>
      The MQMD user name of the originator of the request.

    <agent>
    The agent to ping.

    Attribute Description
    agent Required. The name of the agent.
    QMgr Optional. The queue manager that the agent connects to.

    <reply>
    The name of the queue for the agent to send the reply message to.

    Attribute Description
    QMGR Required. The name of the queue manager where the reply queue is located.


Example

This example shows a ping agent message sent to the agent AGENT_JUPITER. If AGENT_JUPITER is active and able to process agent requests, it sends a response message to the queue WMQFTE.4D400F8B20003708 on QM_JUPITER.
<?xml version="1.0" encoding="UTF-8"?>
<ping:pingAgent xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
                xmlns:ping="http://www.ibm.com/xmlns/wmqfte/7.0.1/PingAgent" 
                version="4.00">   
     <originator>     
          <hostName>example.com.</hostName>     
          <userID>mqm</userID>   
     </originator>   
     <agent agent="AGENT_JUPITER" QMgr="QM_JUPITER"/>   
     <reply QMGR="QM_JUPITER">WMQFTE.4D400F8B20003708</reply>
</ping:pingAgent>
Parent topic: XML message formats used by MFT

Last updated: 2020-10-04