启动MuleServer时出现以下错误 -
11:07:44.523 [main] ERROR org.mule.MuleServer -
消息:在定义中搜索时找不到组件“{http://xyz.com/services/mvi}ProxyService”。检查端点中的命名空间属性是否缺失或者值是否无效。可能的服务匹配:“[]”。所有定义服务:[{http://xyz.com/services/mvi}MVIService] 键入:org.mule.api.lifecycle.InitialisationException 代码:MULE_ERROR-71999 JavaDoc:http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/lifecycle/InitialisationException.html 对象:org.mule.module.cxf.config.FlowConfiguringMessageProcessor@4c372a96
我不确定为什么Mule正在寻找ProxyService,而我已经将MVIServiceProxy定义为组件类。我的cxf代理客户端配置是 -
<flow name="mviProxyService">
<http:inbound-endpoint address="http://localhost:61005/mvi/service" exchange-pattern="request-response">
<cxf:proxy-service wsdlLocation="classpath:mvi.wsdl" namespace="http://xyz.com/services/mvi" />
</http:inbound-endpoint>
<component>
<prototype-object class="com.xyz.services.mvi.MVIServiceProxy">
<property key="requestDispatchUrl" value="jms://mviq.121.order?connector=jmsConnector" />
<property key="responsePollUrl" value="jms://mviq.async.service.reply?connector=jmsConnector" />
<property key="serviceTimeout" value="90000" />
</prototype-object>
</component>
<request-reply timeout="60000">
<jms:outbound-endpoint queue="mviq.121.order" />
<jms:inbound-endpoint queue="mviq.async.service.reply" exchange-pattern="one-way" />
</request-reply>
</flow>
===========对流程的修改===============
<flow name="mviProxyService">
<http:inbound-endpoint address="http://localhost:61005/mvi/service" exchange-pattern="request-response">
<cxf:proxy-service wsdlLocation="classpath:mvi.wsdl" namespace="http://xyz.com/services/mvi" />
</http:inbound-endpoint>
<component class="com.xyz.services.mvi.MVIServiceProxy" />
<request-reply timeout="60000">
<jms:outbound-endpoint queue="mviq.121.order" />
<jms:inbound-endpoint queue="mviq.async.service.reply" exchange-pattern="one-way" />
</request-reply>
</flow>
答案 0 :(得分:1)
您需要在service
上指定cxf:proxy-service
属性。这是您在name
元素的wsdl:service
属性中在WSDL中找到的值。
此外,您的组件无需实施org.mule.api.lifecycle.Callable
。只需要一个接受javax.xml.stream.XMLStreamReader
参数的公共方法,您就可以访问XML有效负载。