gpt4 book ai didi

Mule 自定义连接器发现以元素开头的无效内容

转载 作者:行者123 更新时间:2023-12-04 19:48:33 24 4
gpt4 key购买 nike

我创建了名为 KoreAlert 的自定义连接器。我成功地将它安装到 AnypointStudio。但是,当我在另一个流程中使用它时,出现了这个异常。谁能解决这个问题。

Invalid content was found starting with element 'kore-alert:alert'. One of '{"http://www.mulesoft.org/schema/mule/core":abstract-message-processor, "http://www.mulesoft.org/schema/mule/core":abstract-outbound-endpoint, "http://www.mulesoft.org/schema/mule/core":abstract-mixed-content-message-processor, "http://www.mulesoft.org/schema/mule/core":response}' is expected.

编辑:这是我的连接器处理器签名:

@Processor(friendlyName = "Kore Alert")
public void alert(@RestPostParam("alert") String alert) throws IOException {
koreClient.postAlertInfo(alert);
}

这是使用连接器的 mule 应用程序:

<?xml version="1.0" encoding="UTF-8"?>

<mule xmlns:kore-alert="http://www.mulesoft.org/schema/mule/kore-alert" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:spring="http://www.springframework.org/schema/beans" version="EE-3.6.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/kore-alert http://www.mulesoft.org/schema/mule/kore-alert/current/mule-kore-alert.xsd">
<http:listener-config name="HTTP_Listener_Configuration" host="localhost" port="8081" doc:name="HTTP Listener Configuration"/>
<kore-alert:config-type name="KoreAlert_Configuration" doc:name="KoreAlert: Configuration type strategy"/>
<flow name="kore-alert-userFlow">
<http:listener config-ref="HTTP_Listener_Configuration" path="/hello" doc:name="HTTP"/>
<kore-alert:alert config-ref="KoreAlert_Configuration" alert="'{&quot;title&quot;:&quot;ssss&quot;,&quot;body&quot;:&quot;safdsadfsa&quot;}'" doc:name="KoreAlert"/>
</flow>
</mule>

最佳答案

Mule 无法识别命名空间 kore-alert。你在上面声明了吗?

关于Mule 自定义连接器发现以元素开头的无效内容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30892318/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com