【发布时间】:2013-04-28 16:08:41
【问题描述】:
我尝试在 mule 中创建一个 Data-Mapper 示例,其中入站和出站端点都是文件,看起来有点像。
当我执行这个程序时,文件的输出文件夹仍然是空的,逻辑上我假设我需要在数据映射器和输出文件之间放置和 HashMap 到 XML 转换器。更多我从数据映射器中的示例选项中创建了一个 csv 文件到 xml 文件。 最初我尝试使用 FTP 端点,它开始导致错误,所以我用文件端点替换了 FTP。
我在这里分享 configuration.xml 文件
<mule xmlns:file="....>
<data-mapper:config name="sample_mapper_grf" transformationGraphPath="sample_mapper.grf" doc:name="DataMapper"/>
<flow name="CSV_to_XML_Data_MapperFlow1" doc:name="CSV_to_XML_Data_MapperFlow1">
<file:inbound-endpoint path="/home/jay/CSV_XML_/input" responseTimeout="10000" doc:name="Input File"/>
<data-mapper:transform config-ref="sample_mapper_grf" doc:name="DataMapper"/>
<file:outbound-endpoint path="/home/jay/CSV_XML_/output/" responseTimeout="10000" doc:name="Output File"/>
</flow>
</mule>
Data-Mapper 配置图在这里
【问题讨论】:
-
你能分享你的 mule xml 配置吗?
-
我已经编辑了我的帖子,并提供了更多细节。
-
将 CSV 文件放入
/home/jay/CSV_XML_/input时会发生什么?日志中有任何内容吗?文件是否被 Mule 自动删除? -
您的数据映射器显示错误。你解决了吗?此外,如果您更改底层文件的结构并告诉它刷新元数据,它可能会留下工件。您可能想进入脚本视图,看看那里是否有不应该存在的东西。
-
不,史蒂夫实际上我无法确定错误,但我将上传整个项目并将链接粘贴到此处。甚至在出现错误后,它也会成功转换为 xml。
标签: mule