我需要在Web服务/ SOAP调用上传递params。
我在Anypoint Studio中使用Web服务消费者(需要在Mule CE上运行 - 社区版),但我收到以下消息:“不支持超过1部分的操作消息”
是否有一个表单可以在Mule CE上调用Web Service / SOAP传递params?
感谢您提供任何帮助/示例!
编辑:
Accord评论,我正在测试一个计算器Web服务,在SoapUI中返回结果OK,但是在mule返回0。
我正在使用Set Payload组件传递params。我在SoapUI上返回“xml request”设置了值。
遵循XML代码。
<ws:consumer-config name="Web_Service_Consumer1" wsdlLocation="http://www.dneonline.com/calculator.asmx?WSDL" service="Calculator" port="CalculatorSoap12" serviceAddress="http://www.dneonline.com/calculator.asmx" doc:name="Web Service Consumer"/>
<flow name="calculadora-soap-publicoFlow">
<poll doc:name="Poll">
<set-payload value="<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:tem="http://tempuri.org/"> <soap:Header/> <soap:Body> <tem:Add> <tem:intA>3</tem:intA> <tem:intB>2</tem:intB> </tem:Add> </soap:Body> </soap:Envelope>" doc:name="Set Payload"/>
</poll>
<ws:consumer config-ref="Web_Service_Consumer1" operation="Add" doc:name="Web Service Consumer"/>
<json:xml-to-json-transformer doc:name="XML to JSON"/>
<logger level="INFO" doc:name="Logger" message="#[message.payload]"/>
</flow>
哪里可能是问题?谢谢!
答案 0 :(得分:0)
我发现它是如何工作的。
我们需要传递Web Service Consumer它只是params,不是完整的XML包络。按照Set Payload的值只是params:
<ns0:Add xmlns:ns0="http://tempuri.org/">
<ns0:intA>1</ns0:intA>
<ns0:intB>3</ns0:intB>
</ns0:Add>