腾讯手机管家号码查询:Mule 3.x中对Ftp协议的支持 - 南湖边上的小木屋 - CSDN博客
来源:百度文库 编辑:九乡新闻网 时间:2024/05/06 14:37:50
1. 前言
一直都听说 Mule 对 Ftp 和 Http 协议的支持很好,于是就关注了一下。 Mule 通过一系列的配置文件的配置就可以完成对 Ftp 服务器的下载和上传 ,这个还是很神奇的。 但是可惜的是, Mule 本身并不支持 FtpS 协议,只支持 SFTP ,这样对于工业级的使用上,未免有点不方便 。 2. Mule 3.x 的基本知识
Mule 是一个开源的 ESB 软件,基本概念如下: http://tech.ddvip.com/2010-05/1274838569154227.html
Mule 3.X 中对 Ftp 的支持是通过 < ftp:connector> 等标签实现的,具体的官方信息如下: http://www.mulesoft.org/documentation/display/MULE3USER/FTP+Transport
在 Mule 3.x 中,运行 config.xml 的方法如下: a. 在 app 目录下新建一个目录,比如 test-ftp b. 将写好的 config.xml 拷贝到 test-ftp 下,并且取名为 mule-config.xml c. 在 bin 目录下,运行 CMD 如下 Mule –app test-ftp
3. Mule 3.x 中 ftp 支持的方法
a. 从 ftp 服务器上下载文件的方法 xml version = "1.0" encoding = "UTF-8" ?> < mule xmlns = "http://www.mulesoft.org/schema/mule/core" xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance" xmlns:spring = "http://www.springframework.org/schema/beans" xmlns:http = "http://www.mulesoft.org/schema/mule/http" xmlns:vm = "http://www.mulesoft.org/schema/mule/vm" xmlns:ftp = "http://www.mulesoft.org/schema/mule/ftp" xmlns:file = "http://www.mulesoft.org/schema/mule/file" xsi:schemaLocation = " http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/3.0/mule.xsd http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/3.0/mule-http.xsd http://www.mulesoft.org/schema/mule/vm http://www.mulesoft.org/schema/mule/vm/3.0/mule-vm.xsd http://www.mulesoft.org/schema/mule/file http://www.mulesoft.org/schema/mule/file/3.0/mule-file.xsd http://www.mulesoft.org/schema/mule/ftp http://www.mulesoft.org/schema/mule/ftp/3.0/mule-ftp.xsd" > < ftp:connector name = "ftpConnector" binary = "true" validateConnections = "true" /> < model name = "ftp-model" > < service name = "ftp-reader" > < inbound > < ftp:inbound-endpoint user = "zhany" binary = "true" path = "" password = "zhany" host = "192.168.120.33" port = "21" pollingFrequency = "10000" connector-ref = "ftpConnector" > < file:filename-wildcard-filter pattern = "*.xml" /> ftp:inbound-endpoint > inbound > < outbound > < pass-through-router > < file:outbound-endpoint path = "/e:/out" outputPattern = "[header:originalFilename]" /> pass-through-router > outbound > service > model > mule >
b. 上传文件到 ftp 服务器上的办法 xml version = "1.0" encoding = "UTF-8" ?> < mule xmlns = "http://www.mulesoft.org/schema/mule/core" xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance" xmlns:spring = "http://www.springframework.org/schema/beans" xmlns:http = "http://www.mulesoft.org/schema/mule/http" xmlns:vm = "http://www.mulesoft.org/schema/mule/vm" xmlns:ftp = "http://www.mulesoft.org/schema/mule/ftp" xmlns:file = "http://www.mulesoft.org/schema/mule/file" xsi:schemaLocation = " http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/3.0/mule.xsd http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/3.0/mule-http.xsd http://www.mulesoft.org/schema/mule/vm http://www.mulesoft.org/schema/mule/vm/3.0/mule-vm.xsd http://www.mulesoft.org/schema/mule/file http://www.mulesoft.org/schema/mule/file/3.0/mule-file.xsd http://www.mulesoft.org/schema/mule/ftp http://www.mulesoft.org/schema/mule/ftp/3.0/mule-ftp.xsd" > < file:connector name = "fileConnector" pollingFrequency = "6000" /> < ftp:connector name = "ftpConnector" /> < model name = "model" > < service name = "service" > < inbound > < file:inbound-endpoint path = "/e:/tmp" connector-ref = "fileConnector" > file:inbound-endpoint > inbound > < outbound > < pass-through-router > < ftp:outbound-endpoint host = "192.168.120.33" port = "21" user = "zhany" password = "zhany" path = "" connector-ref = "ftpConnector" /> pass-through-router > outbound > service > model > mule >
本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/nanjingjiangbiao/archive/2010/10/11/5933923.aspx
一直都听说 Mule 对 Ftp 和 Http 协议的支持很好,于是就关注了一下。 Mule 通过一系列的配置文件的配置就可以完成对 Ftp 服务器的下载和上传 ,这个还是很神奇的。 但是可惜的是, Mule 本身并不支持 FtpS 协议,只支持 SFTP ,这样对于工业级的使用上,未免有点不方便 。 2. Mule 3.x 的基本知识
Mule 是一个开源的 ESB 软件,基本概念如下: http://tech.ddvip.com/2010-05/1274838569154227.html
Mule 3.X 中对 Ftp 的支持是通过 < ftp:connector> 等标签实现的,具体的官方信息如下: http://www.mulesoft.org/documentation/display/MULE3USER/FTP+Transport
在 Mule 3.x 中,运行 config.xml 的方法如下: a. 在 app 目录下新建一个目录,比如 test-ftp b. 将写好的 config.xml 拷贝到 test-ftp 下,并且取名为 mule-config.xml c. 在 bin 目录下,运行 CMD 如下 Mule –app test-ftp
3. Mule 3.x 中 ftp 支持的方法
a. 从 ftp 服务器上下载文件的方法 xml version = "1.0" encoding = "UTF-8" ?> < mule xmlns = "http://www.mulesoft.org/schema/mule/core" xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance" xmlns:spring = "http://www.springframework.org/schema/beans" xmlns:http = "http://www.mulesoft.org/schema/mule/http" xmlns:vm = "http://www.mulesoft.org/schema/mule/vm" xmlns:ftp = "http://www.mulesoft.org/schema/mule/ftp" xmlns:file = "http://www.mulesoft.org/schema/mule/file" xsi:schemaLocation = " http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/3.0/mule.xsd http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/3.0/mule-http.xsd http://www.mulesoft.org/schema/mule/vm http://www.mulesoft.org/schema/mule/vm/3.0/mule-vm.xsd http://www.mulesoft.org/schema/mule/file http://www.mulesoft.org/schema/mule/file/3.0/mule-file.xsd http://www.mulesoft.org/schema/mule/ftp http://www.mulesoft.org/schema/mule/ftp/3.0/mule-ftp.xsd" > < ftp:connector name = "ftpConnector" binary = "true" validateConnections = "true" /> < model name = "ftp-model" > < service name = "ftp-reader" > < inbound > < ftp:inbound-endpoint user = "zhany" binary = "true" path = "" password = "zhany" host = "192.168.120.33" port = "21" pollingFrequency = "10000" connector-ref = "ftpConnector" > < file:filename-wildcard-filter pattern = "*.xml" /> ftp:inbound-endpoint > inbound > < outbound > < pass-through-router > < file:outbound-endpoint path = "/e:/out" outputPattern = "[header:originalFilename]" /> pass-through-router > outbound > service > model > mule >
b. 上传文件到 ftp 服务器上的办法 xml version = "1.0" encoding = "UTF-8" ?> < mule xmlns = "http://www.mulesoft.org/schema/mule/core" xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance" xmlns:spring = "http://www.springframework.org/schema/beans" xmlns:http = "http://www.mulesoft.org/schema/mule/http" xmlns:vm = "http://www.mulesoft.org/schema/mule/vm" xmlns:ftp = "http://www.mulesoft.org/schema/mule/ftp" xmlns:file = "http://www.mulesoft.org/schema/mule/file" xsi:schemaLocation = " http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/3.0/mule.xsd http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/3.0/mule-http.xsd http://www.mulesoft.org/schema/mule/vm http://www.mulesoft.org/schema/mule/vm/3.0/mule-vm.xsd http://www.mulesoft.org/schema/mule/file http://www.mulesoft.org/schema/mule/file/3.0/mule-file.xsd http://www.mulesoft.org/schema/mule/ftp http://www.mulesoft.org/schema/mule/ftp/3.0/mule-ftp.xsd" > < file:connector name = "fileConnector" pollingFrequency = "6000" /> < ftp:connector name = "ftpConnector" /> < model name = "model" > < service name = "service" > < inbound > < file:inbound-endpoint path = "/e:/tmp" connector-ref = "fileConnector" > file:inbound-endpoint > inbound > < outbound > < pass-through-router > < ftp:outbound-endpoint host = "192.168.120.33" port = "21" user = "zhany" password = "zhany" path = "" connector-ref = "ftpConnector" /> pass-through-router > outbound > service > model > mule >
本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/nanjingjiangbiao/archive/2010/10/11/5933923.aspx
Mule 3.x中对Ftp协议的支持 - 南湖边上的小木屋 - CSDN博客
初探Mule - 南湖边上的小木屋 - CSDN博客
所谓ESB - 南湖边上的小木屋 - CSDN博客
常用音频协议介绍 - dengjiang1999的专栏 - CSDN博客
mule的jdbc transport
迷人的欧洲小木屋
根据报文格式来理解TCP协议 - 成长的点滴,记录与分享 - CSDN博客
网络协议编写的三层境界 - 程序即人生 - CSDN博客
Adrive支持FTP的免费网络硬盘|福娃空间
如何在项目中研发 - cyberhong的专栏 - CSDN博客
把pscp放到右键中 - zokie的专栏 - CSDN博客
[转载]小木屋包的教程
[C++] 姗姗来迟的C++0x - Eric's Little Hut - CSDN博客
bbbbbbj的专栏 - CSDN博客
csdn技术中心 sip和isup协议互通的研究
【组图】南湖情结 - 雁飞墨行的日志 - 网易博客
【组图】南湖情结 - 老排长的日志 - 网易博客
【原摄】南湖赏蝶 - 宁采蝶的日志 - 网易博客
FTP之家:对ftp工具CuteFtp同步功能的利用
喀纳斯云雾缭绕的红色小木屋
IT 女生对未来职业的一点思考 - urinaway的专栏 - CSDN博客
IT 女生对未来职业的一点思考 - urinaway的专栏 - CSDN博客
悬崖边上的股市
人生边上的梦