WSO2 微积分器:错误 - 来自连接器文件的中介器无法识别

问题描述 投票:0回答:1

对于 WSO2 Microintegrator 项目,我需要读取 JSON 文件。为了练习使用文件连接器(读取中介器),我这样做了:

  • 使用连接器导出器功能创建一个非常简单的测试集成项目
  • 在工作区中下载文件连接器。 Studio 回答连接器已加载到工作区

项目代码是这样的:

<api context="/read" name="init" xmlns="http://ws.apache.org/ns/synapse">
    <resource methods="GET" uri-template="/json">
        <inSequence>
            <file.read configKey="FILE_CONNECTION_1">
                <path>test.json</path>
                <readMode>Complete File</readMode>
                <includeResultTo>Message Body</includeResultTo>
                <enableStreaming>false</enableStreaming>
                <enableLock>false</enableLock>
            </file.read>
            <respond/>
        </inSequence>
        <outSequence/>
        <faultSequence/>
    </resource>
</api>

就像触发文件读取操作的 REST API 一样简单。 当导出工件并在 Integration Studio 的集成服务器上运行它时,会出现以下消息

配置元素引用的未知中介:{http://ws.apache.org/ns/synapse}file

出现

,并且应用程序已取消部署。我认为这个问题已经被报告,但没有给出解决方案。是否是连接器和服务器或Integration Studio版本的问题? 工作室版本:8.2.0 服务器版本:4.2.0(外部服务器中的 4.3.0 也具有相同的结果) 文件连接器版本:4.0.32

有什么想法吗?其他建议的连接器? 预先感谢

  • 验证项目包含连接器导出器
  • 我进入菜单添加/删除连接器 -> 删除连接器(没有完全删除操作)并且文件存在,所以我猜连接器已正确加载。
  • 在内部 Studio 服务器(版本 4.2.0)和外部服务器(版本 4.3.0)中部署应用程序
  • 在这两种情况下都会生成错误并取消部署应用程序
file wso2-enterprise-integrator connector
1个回答
0
投票

当您导出 CAR 文件/在嵌入式 Micro Integrator 中运行时,请确保在 CompositeExporter 模块中选择 ConnectorExporter。

enter image description here

最新问题
© www.soinside.com 2019 - 2025. All rights reserved.