【发布时间】:2017-04-08 03:45:15
【问题描述】:
我想知道如何从soap 端点获取请求参数。 更具体地说,我有一个基于 http-listener 的端点,我通过一个肥皂客户端调用这个端点,我想获得一个在这个肥皂请求的正文中发送的值。 这是技术规格..
我正在使用 mule 3.8 和 Anypoint Studio 6.1.2
这是我风景的一部分 这是我的 mule xml 的一部分:
<http:listener-config name="HTTP_Listener_Configuration" host="0.0.0.0" port="8081"
doc:name="HTTP Listener Configuration"/>
<cxf:configuration name="CXF_Configuration" enableMuleSoapHeaders="true" initializeStaticBusInstance="true"
doc:name="CXF Configuration"/>
<ws:consumer-config name="Web_Service_Consumer" service="KarmaService" port="KarmaPort"
serviceAddress="http://localhost:8080/TestingWS/Karma" wsdlLocation="http://localhost:8080/TestingWS/Karma?wsdl" doc:name="Web Service Consumer"/>
<flow name="pichondemonoFlow">
<http:listener config-ref="HTTP_Listener_Configuration" path="/" doc:name="HTTP"/>
<cxf:proxy-service configuration-ref="CXF_Configuration" payload="body" doc:name="CXF"/>
<set-variable variableName="pichonVar" value="#[message.inboundProperties.'http.query.params'.arg0]"
doc:name="Variable"/>
<choice doc:name="Choice">
.
.
.
.
这是来自 SoapUI 客户端的请求:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sup="http://support.cxf.module.mule.org/">
<soapenv:Header/>
<soapenv:Body>
<sup:invoke>
<!--Optional:-->
<sup:arg0>Some value</sup:arg0>
</sup:invoke>
</soapenv:Body>
</soapenv:Envelope>
我还阅读了一些关于 xpath3 的内容,但我不知道这是否是解析我的 xml 请求的最佳方式。 最好的方法是什么?
希望可以理解。
如果有人可以帮助我,我将不胜感激。 提前致谢!
【问题讨论】:
标签: xml soap mule esb anypoint-studio