WSO2 EI,Integration Studio,碳应用程序中的自定义调解器

WSO2 EI, Integration Studio, custom mediator inside carbon application

我已经通过 Integration Studio 在我的 ESB 项目中创建了自定义中介器,如下所示:

之后,我将我的项目构建为碳应用程序:

当我尝试上传这个汽车文件时,它抛出了那种异常:

java.lang.ClassNotFoundException: com.example.mediators.UserApiXMLSignMediator cannot be found by synapse-core_2.1.7.wso2v99

为什么会这样?我错过了什么?我知道我可以将编译后的 *.jar 文件上传到 wso2 的文件夹中。然而这对我来说是行不通的。

请尝试解压car文件并检查car文件中是否存在相关的jar文件。如果 jar 不存在,则意味着问题出在工具项目上。 [1] 中的博客包含有关使用集成工作室创建 class 中介器的说明。请参考给出的步骤,并确保在创建汽车文件时工具项目没有错误。

请注意,当您将 *.jar 文件添加到 lib 文件夹中时,部署的服务器中的任何中介都可以使用该文件。但是当 jar 文件与 car 文件打包时,class 中介只能由该 car 文件中的工件访问。

[1]-https://medium.com/wso2-enterprise-integrator-wso2-dev-studio-wso2/developing-and-debugging-custom-mediators-using-wso2-integration-studio-a3d974d1a2cf