【问题标题】:Mule ESB proxy soap webserviceMule ESB 代理肥皂网络服务
【发布时间】:2013-12-18 12:37:11
【问题描述】:

我想使用 Mule ESB 作为我的 Web 服务的代理。我是 SOATest 来模拟客户端。 我是初学者,我正在使用 Mule Studio,但我不知道应该使用哪个组件。 我还需要从肥皂请求中获取参数值。 有什么想法吗?

这是我的配置:

<?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>

【问题讨论】:

    标签: mule esb


    【解决方案1】:

    【讨论】:

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

    您需要使用 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>
    

    您可以根据需要修改流程

    【讨论】:

      【解决方案3】:

      尝试这样做可能会有所帮助:

          <?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>
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2021-07-29
        • 2017-01-16
        • 2017-12-10
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2011-06-11
        相关资源
        最近更新 更多