Example: Viewing the status of a file transfer using an HTTP request

You can view the status of your file transfer by submitting a request through the WebSphere® MQ File Transfer Edition Web Gateway. The Web Gateway returns information in XML format that describes the current status of the specified transfer. To view the status of file transfers by using the Web Gateway, you must have a database logger in your WebSphere MQ File Transfer Edition network.

About this task

A successful request returns an HTTP status code of 200 and an XML payload that describes the current status of the transfer. You can use this XML to view details of the transfer including the status of the transfer, the transfer ID, source and destination agent details, and information about the transfer's source and destination files.

You can view the status of a file transfer if you initiated the upload or if you own the file space to which the file is transferred. If your user ID is associated with either of the WebSphere MQ File Transfer Edition security roles wmqfte-audit or wmqfte-admin, you can view the status of all file transfers in your WebSphere MQ File Transfer Edition network.

The following steps describe how to submit a request. In this example, the server hosting the WebSphere MQ File Transfer Edition Web Gateway is example.com and the HTTP request is submitted using a web browser which identifies itself as mozilla.

Procedure

  1. Create an HTTP request with the following format:
    GET HTTP/1.1 /transfer/414d51205245444841542e434f4f5244ed60b44b03310020
    Host: example.com
    User-Agent: mozilla
    The final part of the URL is the valid 48-character hexadecimal WebSphere MQ File Transfer Edition transfer ID of the transfer you want to view.
  2. Submit the request to the Web Gateway. The Web Gateway returns an HTTP response with the following format:
    HTTP/1.1 200 OK
    Server: WAS/6.0
    Content-Length: 1664
    Content-type: application/xml
    
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <transfers>
    	<transfer start-time="2010-04-01T13:10:04.209+01:00" status="Complete"
    		id="414d51205245444841542e434f4f5244ed60b44b03310020">
    		<source>
    			<agent qmgr="REDHAT.SOURCE.QM" name="REDHAT.SOURCE.AGENT" />
    			<metadata>
    				<key value="REDHAT.SOURCE.AGENT" name="com.ibm.wmqfte.SourceAgent" />
    				<key value="REDHAT.DEST.AGENT" name="com.ibm.wmqfte.DestinationAgent" />
    				<key value="192.168.243.133" name="com.ibm.wmqfte.OriginatingHost" />
    				<key value="fteuser" name="com.ibm.wmqfte.MqmdUser" />
    				<key value="414d51205245444841542e434f4f5244ed60b44b03310020"
    					name="com.ibm.wmqfte.TransferId" />
    				<key value="fteuser" name="com.ibm.wmqfte.OriginatingUser" />
    			</metadata>
    		</source>
    		<destination>
    			<agent qmgr="REDHAT.SOURCE.QM" name="REDHAT.SOURCE.AGENT" />
    			<metadata>
    				<key value="REDHAT.SOURCE.AGENT" name="com.ibm.wmqfte.SourceAgent" />
    				<key value="REDHAT.DEST.AGENT" name="com.ibm.wmqfte.DestinationAgent" />
    				<key value="fteuser" name="com.ibm.wmqfte.MqmdUser" />
    				<key value="192.168.243.133" name="com.ibm.wmqfte.OriginatingHost" />
    				<key value="fteuser" name="com.ibm.wmqfte.OriginatingUser" />
    				<key value="414d51205245444841542e434f4f5244ed60b44b03310020"
    					name="com.ibm.wmqfte.TransferId" />
    			</metadata>
    		</destination>
        <stats retry-count="0" file-warnings="0" file-failures="0"
          bytes-transferred="67" />
        <transfer-set>
          <file result-code="0" mode="text">
            <source-file name="/home/fteuser/accounts.txt">
    					<attribute-values last-modified="2010-03-17T16:55:17.000Z"
                file-size="67" disposition="leave" checksum-method="none" />
            </source-file>
            <destination-file name="/tmp/accounts.txt">
              <attribute-values last-modified="2010-04-01T13:10:04.000+01:00"
                file-size="67" exists-action="error" checksum-method="none" />
            </destination-file>
          </file>
        </transfer-set>
      </transfer>
    </transfers>
    An invalid request returns an HTTP error code and a WebSphere MQ File Transfer Edition error message. To identify the cause of the error, see Troubleshooting the Web Gateway.

Task Task

Feedback

Timestamp icon Last updated: Tuesday, 30 January 2018
http://www.ibm.com/support/knowledgecenter/SSEP7X_7.0.4/com.ibm.wmqfte.doc/web_monitoring_transfers.htm