【问题标题】:MULE ESB -> SOAP mapping - Easy Method don't workMULE ESB -> SOAP 映射 - 简单方法不起作用
【发布时间】:2014-09-06 04:23:04
【问题描述】:

大家好,我是 Mule 的新手,所以请放轻松。首先,我将向您展示 SOAP UI 的示例:

这是 WSDL 文件:wsdl file

这很容易。我想制作完全相同的 mule 流(没有输入数据等 - 在代码中设置有效负载)。问题是我简单的甚至无法启动。我读了教程: http://www.mulesoft.org/documentation/display/current/XML-only+SOAP+Web+Service+Example

但我仍然不能像这里那样进行数据映射。知道我做错了什么,我的整个流程并不大......现在看起来像这样:

<flow doc:name="PostRequest" name="PostRequest">
    <http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8081" path="getPostRequest" doc:name="HTTP" />
    <cxf:jaxws-client operation="PostRequest" doc:name="SOAP"
            enableMuleSoapHeaders="true" clientClass="pl.execon.integration.axpppk.ws.client.XISGateway"
            port="XISGatewaySoap" />
     <http:outbound-endpoint address="http://localhost:8889/Service/XISGateway.asmx" />
     <object-to-string-transformer doc:name="Object to String" />
</flow>

我想使用 PostRequest ...有什么建议吗?可以提供帮助的教程?问题是我需要修改这个信封:

   <soap:Body>
      <m:PostRequest>
    <m:_requestCode>Test</m:_requestCode>
            <m:GetGasCustTable>
                         <m:XMLDocumentTime>2014-07-21T12:24:50</m:XMLDocumentTime>
                         <m:CustAccount>00043280</m:CustAccount>
           </m:GetGasCustTable>
      </m:PostRequest>
   </soap:Body>

我根本不知道怎么做

【问题讨论】:

  • 抱歉,本教程只展示了如何创建简单的 HELLO WORD 而无需向有效负载写入任何内容问题是我不知道如何将其写入 SoapBody:&lt;soap:Body&gt; &lt;m:PostRequest&gt; &lt;m:_requestCode&gt;Test&lt;/m:_requestCode&gt; &lt;m:GetGasCustTable&gt; &lt;m:XMLDocumentTime&gt;2014-07-21T12:24:50&lt;/m:XMLDocumentTime&gt; &lt;m:CustAccount&gt;00043280&lt;/m:CustAccount&gt; &lt;/m:GetGasCustTable&gt; &lt;/m:PostRequest&gt; &lt;/soap:Body&gt;
  • 如果你想使用一个外部的 web 服务,它需要在那里 .. 例如在这里你想使用一个 localhost:8889/Service/XISGateway.asmx 的 web 服务 .. 所以这个 web 服务必须存在于你的本地主机中

标签: java web-services soap wsdl mule


【解决方案1】:

如果想使用 post 并映射 web 服务,只需使用模式,这是 post 方法的工作代码:

<pattern:web-service-proxy name="webserviseName">
    <inbound-endpoint address="http://localhost:8081/localUWant" exchange-pattern="request-response"/>
    <outbound-endpoint address="http://localhost:8889/Service/XISGateway.asmx" exchange-pattern="request-response"/>
</pattern:web-service-proxy>

就这么简单。

这是文档:http://www.mulesoft.org/documentation/display/current/Using+Mule+Configuration+Patterns

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-06-29
    • 1970-01-01
    • 1970-01-01
    • 2015-06-06
    • 2012-06-24
    • 1970-01-01
    相关资源
    最近更新 更多