从远程服务器获取通道表文件

我正在尝试使用位于远程服务器中的ccdt文件设置ccdturl。 我尝试使用ftp设置ccdt url,但它没有用。 有谁知道在远程服务器中为ccdt文件设置url的正确方法是什么? 谢谢!

我试过了:

String channelTablePath = "ftp://user@host:/path-to-ccdt-file"; Url url = new URL(channelTablePath ); connectionFactory.setCCDTURL(url); 

我得到的错误是:

 Exception in thread "main" javax.jms.JMSException: JMSWMQ2020: Failed to connect to queue manager '*QQ' with connection mode 'Client' and supplied CCDT URL 'ftp://user@host:/path/ccdt.tab', see linked exception for more information. JMS Error code: com.ibm.mq.MQException: JMSCMQ0001: WebSphere MQ call failed with compcode '2' ('MQCC_FAILED') reason '2278' ('MQRC_CLIENT_CONN_ERROR'). EXPLANATION: The filesystem returned error code 'java.net.ConnectException[Connection timed out]' for file 'ftp://user@host:/path/ccdt.tab'. ACTION: Record the name of the file 'ftp://user@host:/path/ccdt.tab' and tell the systems administrator, who should ensure that file 'ftp://user@host:/path/ccdt.tab' is correct and available. 

概要:

URL中的主机后面不应该有冒号(:)。 如果需要,您应在URL中指定密码值。 您还需要指定ccdt文件的名称。 在本答案结尾处提到IBM Knowlege中心。

请尝试以下值:

 String channelTablePath = "ftp://user:pass@host/path-to-ccdt-file/AMQCLCHL.TAB"; 

IBM MQ v9知识中心页面“ 将客户机通道定义表与IBM MQ for JMS类一起使用 ”指出:

作为另一个示例,假设文件ccdt2.tab包含客户端通道定义表,并且存储在与运行应用程序的系统不同的系统上。 如果可以使用FTP协议访问该文件,则应用程序可以通过以下方式设置CCDTURL属性:

 java.net.URL chanTab2 = new URL("ftp://ftp.server/admdata/ccdt2.tab"); factory.setCCDTURL(chanTab2); 

IBM MQ v9知识中心页面“ 对客户端通道定义表的Web可寻址访问 ”显示了具有用户名和密码的FTP URL示例:

认证连接

 export MQCHLLIB=ftp://myuser:password@myhost.sample.com/var/mqm/qmgrs/QMGR/@ipcc export MQCHLLIB=http://myuser:password@myhost.sample.com/var/mqm/qmgrs/QMGR/@ipcc 

注意

如果要使用经过身份validation的连接,则必须像使用JMS一样提供URL中编码的用户名和密码