Mule ESB代理soap Web服务

Mule ESB代理soap Web服务,mule,esb,Mule,Esb,我想使用Mule ESB作为web服务的代理。我最喜欢模仿客户。 我是一个初学者,我正在使用Mule Studio,我不知道应该使用哪个组件。 我还需要从soap请求中获取参数值。 有什么想法吗 以下是我的配置: <?xml version="1.0" encoding="UTF-8"?> <mule xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:cxf="http://www.mulesoft.org

我想使用Mule ESB作为web服务的代理。我最喜欢模仿客户。 我是一个初学者,我正在使用Mule Studio,我不知道应该使用哪个组件。 我还需要从soap请求中获取参数值。 有什么想法吗

以下是我的配置:

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

<mule xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:cxf="http://www.mulesoft.org/schema/mule/cxf" 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="CE-3.3.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd 
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/cxf http://www.mulesoft.org/schema/mule/cxf/current/mule-cxf.xsd ">
    <flow name="getValidation_FlowFlow1" doc:name="getValidation_FlowFlow1">
        <http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8090" path="MyWSService/GetValidation" doc:name="Inbound"/>
        <http:outbound-endpoint exchange-pattern="request-response" host="XX.XXX.X.XX" port="8080" path="ws/MyWSService" doc:name="Outbound"/>
    </flow>
</mule>

使用CXF代理Web服务:

您需要将CXF代理用于web服务代理 Mule代理服务的一个例子是:-

<flow name="ProxyFlow" doc:name="ProxyFlow" processingStrategy="synchronous">
 <http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8086" path="proxy/mainData" doc:name="HTTP" />
 <cxf:proxy-service  namespace="http://services.test.com/schema/MainData/V1" service="MainData"  payload="body" wsdlLocation="MainData.wsdl" doc:name="SOAP"/> 
 <cxf:proxy-client payload="body" doc:name="SOAP" />
 <http:outbound-endpoint exchange-pattern="request-response" host="localhost" port="8082" path="mainData" method="POST" doc:name="HTTP" />
</flow>


您可以根据需要修改流程

尝试以下操作可能会有所帮助:

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

<mule xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:cxf="http://www.mulesoft.org/schema/mule/cxf" 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" 
    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/cxf http://www.mulesoft.org/schema/mule/cxf/current/mule-cxf.xsd">
    <http:listener-config name="HTTP_Listener_Configuration" host="localhost" port="8081" doc:name="HTTP Listener Configuration"/>
    <cxf:configuration name="CXF_Configuration" enableMuleSoapHeaders="true" initializeStaticBusInstance="true" doc:name="CXF Configuration"/>
    <flow name="soapFlow">
        <http:listener config-ref="HTTP_Listener_Configuration" path="/helloworld" doc:name="HTTP"/>
        <cxf:jaxws-service configuration-ref="CXF_Configuration" serviceClass="soap.ISoapInterface" doc:name="CXF"/>
        <component class="soap.HelloSoap" doc:name="Java"/>
    </flow>
</mule>


谢谢,但我已经阅读了文档,但不明白,我需要的可能是一个示例。您不明白的是什么?我在JBoss服务器上部署了我的WS,我使用SOATest模拟客户机,并使用Mule ESB作为中介将请求从客户机路由到JBoss服务器上的WS。我的ws包含2个方法,一个不需要任何参数(适用于mule),另一个需要二进制类型的参数(字节数组),我无法读取请求范围来提取参数并路由它们。发布配置。