我想知道如何從soap端點獲取請求參數。 更具體地說,我有一個基於http-listener的端點,我通過一個soap客戶端調用這個端點,我想獲得一個在這個soap請求的主體中發送的值。 下面是技術上的規格..如何從騾子的soap端點獲取請求參數?
我用騾子3.8和Anypoint工作室6.1.2
這是我的風景 這裏的一部分是我的騾子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但我不知道這是否是百世t解析我的xml請求的方式。 什麼是最好的方法?
希望這可以被忽略。
我很感謝有人能幫助我。 在此先感謝!