【发布时间】: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:
<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> -
如果你想使用一个外部的 web 服务,它需要在那里 .. 例如在这里你想使用一个 localhost:8889/Service/XISGateway.asmx 的 web 服务 .. 所以这个 web 服务必须存在于你的本地主机中
标签: java web-services soap wsdl mule