0

我在 mule 中设置了一些代理服务,但仍在学习中。由于某种原因,当命名空间和服务名称应该正确时,此流程不起作用。有人看到我的错误吗?

谢谢你的时间

<flow name="UPCFlow1" doc:name="UPCFlow1">
    <http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="4040" path="upc" doc:name="HTTP"/>
    <cxf:proxy-service namespace="http://searchupc.com/" service="GetProduct" payload="envelope" wsdlLocation="http://www.searchupc.com/service/UPCSearch.asmx?WSDL"  doc:name="SOAP" port="UPCSearchSoap"/>
<http:outbound-endpoint address="http://www.searchupc.com/supc/service/UPCSearch.asmx"
    exchange-pattern="request-response" doc:name="HTTP"/>
</flow>

这是来自堆栈跟踪

INFO  2012-10-12 11:06:44,739 [main] org.mule.module.launcher.application.DefaultMuleApplication: App 'upc' never started, nothing to dispose of
Exception in thread "main" org.mule.module.launcher.DeploymentInitException: ServiceConstructionException: Could not find definition for service {http://searchupc.com/}GetProduct.
4

1 回答 1

0

您的配置存在问题:服务名称是“UPCSearch”而不是“GetProduct”。

这有效:

<flow name="UPCFlow1" doc:name="UPCFlow1">
    <http:inbound-endpoint exchange-pattern="request-response"
        host="localhost" port="4040" path="upc" doc:name="HTTP" />
    <cxf:proxy-service namespace="http://searchupc.com/"
        service="UPCSearch" payload="envelope"
        wsdlLocation="http://www.searchupc.com/service/UPCSearch.asmx?WSDL"
        doc:name="SOAP" port="UPCSearchSoap" />
    <http:outbound-endpoint
        address="http://www.searchupc.com/supc/service/UPCSearch.asmx"
        exchange-pattern="request-response" doc:name="HTTP" />
</flow>
于 2012-10-12T17:22:59.807 回答