首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用选择流控制的Mule路由Web服务

使用选择流控制的Mule路由Web服务
EN

Stack Overflow用户
提问于 2013-11-06 21:51:04
回答 1查看 659关注 0票数 0

我正在尝试使用选择流控制来路由SOAP web服务,它依赖于有效负载来更改为匹配的web服务。这是我的流程

代码语言:javascript
复制
<flow name="ProxyServiceFlow1" doc:name="ProxyServiceFlow1">
    <http:inbound-endpoint exchange-pattern="request-response"
        address="http://localhost:8081/hrManagerServiceProxy" doc:name="HTTP" />
    <set-variable variableName="clientType"
        value="#[message.inboundProperties['http.query.params']['clientType']]"
        doc:name="Set clientType" />
    <choice doc:name="Choice">
        <when expression="#[clientType == 'unsecure']">
            <cxf:proxy-service namespace="http://service.freetalk.viettel.com/"
                service="RegisterServiceService" payload="body" wsdlLocation="unsecure.wsdl"
                enableMuleSoapHeaders="false" doc:name="SOAP" />
            <http:outbound-endpoint exchange-pattern="request-response" method="POST" address="http://localhost:8081/HR/hrManagerService" doc:name="HTTP"/>
        </when>
        <otherwise>
            <cxf:proxy-service namespace="http://service.freetalk.viettel.com/"
                service="RegisterServiceService" payload="body" wsdlLocation="unsecure2.wsdl"
                enableMuleSoapHeaders="false" doc:name="SOAP" />
            <http:outbound-endpoint exchange-pattern="request-response" method="POST" address="http://localhost:8081/HR/hrManagerService" doc:name="HTTP"/>
        </otherwise>
    </choice>
</flow>

这只是我的想法,因为我搜索了很多次,但仍然没有得到任何结果。有人能给我一些建议吗?

EN

回答 1

Stack Overflow用户

发布于 2013-11-06 23:25:45

它不是需要与HTTP一起使用的cxf:proxy-service

应该是cxf:proxy-client

尝试对您的http:outbound-端点使用cxf:proxy-client

代码语言:javascript
复制
    <choice doc:name="Choice">
        <when expression="#[clientType == 'unsecure']">
            <http:outbound-endpoint exchange-pattern="request-response" method="POST" address="http://localhost:8081/HR/hrManagerService" doc:name="HTTP">
                <cxf:proxy-client payload="body" enableMuleSoapHeaders="true">      
                </cxf:proxy-client> 
            </http:outbound-endpoint>
        </when>
        <otherwise>             
            <http:outbound-endpoint exchange-pattern="request-response" method="POST" address="http://localhost:8081/HR/hrManagerService" doc:name="HTTP">
                <cxf:proxy-client payload="body" enableMuleSoapHeaders="true">      
                </cxf:proxy-client> 
            </http:outbound-endpoint>
        </otherwise>
    </choice>

希望这能有所帮助。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/19813849

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档