使用 ProtocolBridgeProperties.xml 文件定义协议文件服务器的属性
定义一个或多个协议文件服务器的属性,您希望使用代理程序配置目录中的 Managed File Transfer 提供的 ProtocolBridgeProperties.xml 文件与这些服务器之间传输文件。
关于本任务
fteCreateBridgeAgent 命令在代理程序配置目录 MQ_DATA_PATH/mqft/config/coordination_queue_manager/agents/bridge_agent_name中创建 ProtocolBridgeProperties.xml 文件。 如果运行命令时指定缺省值,那么该命令还会在此文件中为缺省协议文件服务器创建一个条目。
消息 BFGCL0392I 将提供 ProtocolBridgeProperties.xml 文件的位置。
<?xml version="1.0" encoding="IBM-1047"?>
<!--
This ProtocolBridgeProperties.xml file determines the protocol servers that will be accessed by the
MQMFT protocol bridge agent.
Each protocol server is defined using either a <tns:ftpServer>, <tns:ftpsServer>, or <tns:sftpServer>
element - depending on the protocol used to communicate with the server. When the protocol
bridge agent participates in a managed file transfer it will determine which server to used based on
the prefix (if any) present on the file path. For example a file path of 'server1:/home/user/file.txt' would
be interpreted as a request to transfer /home/user/file.txt using 'server1'. The server name is compared
to the 'name' attribute of each <tns:ftpServer>, <tns:ftpsServer> or <tns:sftpServer> element in this
XML document and the first match is used to determine which protocol server the protocol bridge
agent will connect to. If no match is found then the managed file transfer operation will fail.
If a file path is not prefixed with a server name, for example '/home/user/file.txt' then this XML
document can specify a default server to use for the managed file transfer. To specify a
default server use the <tns:defaultServer> element as the first element inside the <tns:serverProperties>
element. The default server will be used whenever the protocol bridge agent participates in
a managed file transfer for file names which do not specify a prefix.
An optional <tns:limits> element can be specified within each server definition. This element contains
attributes that govern the amount of resources used by each defined server.
An optional <tns:credentialsFile> element can be specified within each serverProperties definition. This
element contains a path to a file containing credentials to be used when connecting to defined servers.
An example ProtocolBridgeProperties.xml file is as follows:
<?xml version="1.0" encoding="UTF-8"?>
<tns:serverProperties xmlns:tns="http://wmqfte.ibm.com/ProtocolBridgeProperties"
xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://wmqfte.ibm.com/ProtocolBridgeProperties ProtocolBridgeProperties.xsd">
<tns:credentialsFile path="$HOME/ProtocolBridgeCredentials.xml" />
<tns:defaultServer name="myFTPserver" />
<tns:ftpServer name="myFTPserver" host="windows.hursley.ibm.com" port="1234" platform="windows"
timeZone="Europe/London" locale="en_GB" fileEncoding="UTF-8"
listFormat="unix" limitedWrite="false">
<tns:limits maxListFileNames="100" maxListDirectoryLevels="999999999"
maxReconnectRetry="2" reconnectWaitPeriod="10"
maxSessions="60" socketTimeout="30" />
</tns:ftpServer>
<tns:ftpsServer name="myFTPSserver" host="unix.hursley.ibm.com" platform="unix"
timeZone="Europe/London" locale="en_GB" fileEncoding="UTF8"
listFormat="unix" limitedWrite="false" ftpsType="explicit"
trustStore="C:\FTE\keystores\myFTPSserver\FTPSKeyStore.jks" trustStorePassword="password">
<tns:limits maxReconnectRetry="10" connectionTimeout="10"/>
</tns:ftpsServer>
<tns:sftpServer name="mySFTPserver" host="windows.hursley.ibm.com" platform="windows"
timeZone="Europe/London" locale="en_GB" fileEncoding="UTF-8"
limitedWrite="false">
<tns:limits connectionTimeout="60"/>
</tns:sftpServer>
</tns:serverProperties>
This example shows the outermost <tns:serverProperties> element which must exist for the document to
be valid, an optional <tns:defaultServer> element, as well as definitions for an FTP, FTPS and SFTP server.
The attributes of the <tns:ftpServer>, <tns:ftpsServer> and <tns:sftpServer> elements determine the
characteristics of the connection established to the server. These attributes correspond to the command
line parameters for the 'fteCreateBridgeAgent' command.
The following attributes are valid for all of the <tns:ftpServer>, <tns:ftpsServer> and <tns:sftpServer>
elements: name, host, port, platform, fileEncoding, limitedWrite and controlEncoding.
The following attributes are valid for the <tns:ftpServer> and <tns:ftpsServer> elements: timezone, locale,
listFormat, listFileRecentDateFormat, listFileOldDateFormat, and monthShortNames.
The following attributes are valid for the <tns:ftpServer> element only: passiveMode
The following attributes are valid for the <tns:ftpsServer> element only: ftpsType, trustStore, trustStorePassword,
trustStoreType, keyStore, keyStorePassword, keyStoreType, ccc, protFirst, auth, and connectTimeout.
The following attributes are valid for the <tns:limits> element within all of the <tns:ftpServer>, <tns:ftpsServer>
and <tns:sftpServer> elements: maxListFileNames, maxListDirectoryLevels, maxReconnectRetry, reconnectWaitPeriod,
maxSessions and socketTimeout
-->
<tns:serverProperties xmlns:tns="http://wmqfte.ibm.com/ProtocolBridgeProperties"
xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://wmqfte.ibm.com/ProtocolBridgeProperties ProtocolBridgeProperties.xsd">
<!-- By default the location of the credentials file is in the home directory of the user that started the -->
<!-- protocol bridge agent. If you wish to specify a different location use the credentialsFile element to -->
<!-- do this. For example: -->
<!-- <tns:credentialsFile path="/test/ProtocolBridgeCredentials.xml"/> -->
<tns:defaultServer name="WINMVSCA.HURSLEY.IBM.COM" />
<tns:ftpServer name="WINMVSCA.HURSLEY.IBM.COM" host="WINMVSCA.HURSLEY.IBM.COM" platform="unix"
timeZone="Europe/London" locale="en-GB" fileEncoding="US-ASCII"
listFormat="unix" limitedWrite="false" />
<!-- Define servers here -->
</tns:serverProperties>该命令可以生成以下消息:BFGCL0532I:
为使该代理正常运行,必须手工创建一个额外的凭证文件。 默认情况下,该文件名为 ProtocolBridgeCredentials ,位于主目录中 启动代理程序的用户的目录。 例如,如果此用户启动了代理程序 文件位置为 $HOME/ProtocolBridgeCredentials
如果使用凭证文件:
- 请参阅以下文本以获取有关如何创建凭证文件的进一步信息。
- 凭证文件必须位于具有受限许可权的目录中。 例如,其他用户不能具有读访问权。
- 在已启动代理的用户标识的
$HOME环境变量中为凭证文件指定目录的位置,或者编辑 ProtocolBridgeProperties.xml 文件并指定位置:<tns:credentialsFile path="/test/ProtocolBridgeCredentials.xml"/>
注: 协议网桥代理不支持文件锁定。 这是因为 Managed File Transfer 不支持文件服务器上的文件锁定机制。