Moj*_*aba 5 session-variables httplistener mule mule-studio mule-component
我的M子里composite-source有两个http:listener。
在收到来自这些侦听器的请求之后,我想基于每个侦听器设置一个变量;
但是在mule 3.6.0中部署时会发生此错误:
org.mule.module.launcher.DeploymentInitException: SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'set-session-variable'. One of '{"http://www.mulesoft.org/schema/mule/core":annotations, "http://www.mulesoft.org/schema/mule/http":response-builder, "http://www.mulesoft.org/schema/mule/http":error-response-builder}' is expected.
Run Code Online (Sandbox Code Playgroud)
我该怎么办??
这是我的代码:
<composite-source doc:name="Composite Source">
<http:listener config-ref="HTTP_Listener_Configuration_Source1"
path="/" doc:name="HTTP">
<set-session-variable doc:name="Session Variable" value="#[x]" variableName="x" />
</http:listener>
<http:listener config-ref="HTTP_Listener_Configuration_Source2"
path="/" doc:name="HTTP">
<set-session-variable doc:name="Session Variable" value="#[y]" variableName="x" />
</http:listener>
</composite-source>
Run Code Online (Sandbox Code Playgroud)
PS我已经做到了 http:inbound-endpoint
把 a 放在set-session-variable那里是非法的:Mule 模式不允许这样做。
原因是http:listener不是常规endpoint,就像http:inbound-endpointis 一样,因此不支持这种嵌套,就像所有其他端点一样。
这是不幸的,希望最终能得到解决。同时,您需要找到另一种方法来区分这两个侦听器之间的请求。
为此,我建议您检查他们创建的所有入站消息属性,寻找差异点。我希望MULE_这里有一个可用的属性,但您必须检查您的特定上下文以及HTTP_Listener您正在使用的特定配置。
| 归档时间: |
|
| 查看次数: |
372 次 |
| 最近记录: |