Web Service Consumer Anypoint Studio (CE runtime):

2019-08-29 06:26发布

I need to pass params on Web Service/SOAP calls.

I am using Web Service Consumer in Anypoint Studio (needs run on Mule CE - Community Edition), but I received the following message: "Operation messages with more than 1 part are not supported"

Is there a form to call Web Service/SOAP on Mule CE passing params?

Thanks for any help/examples!

EDIT:

Accord comment, I am testing a calculator web service, in SoapUI return result OK, but in mule return 0.

I am passing the params with Set Payload component. I setted the value with "xml request" returned on SoapUI.

Following the XML code.

<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="&lt;soap:Envelope xmlns:soap=&quot;http://www.w3.org/2003/05/soap-envelope&quot; xmlns:tem=&quot;http://tempuri.org/&quot;&gt; &lt;soap:Header/&gt; &lt;soap:Body&gt; &lt;tem:Add&gt; &lt;tem:intA&gt;3&lt;/tem:intA&gt; &lt;tem:intB&gt;2&lt;/tem:intB&gt; &lt;/tem:Add&gt; &lt;/soap:Body&gt; &lt;/soap:Envelope&gt;" 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>

Where could be the problem? Thanks!

1条回答
Emotional °昔
2楼-- · 2019-08-29 07:14

I found how it works.

We need to pass Web Service Consumer it´s just params, does not full XML envelop. Following the value of the Set Payload just params:

  <ns0:Add xmlns:ns0="http://tempuri.org/">
     <ns0:intA>1</ns0:intA>
     <ns0:intB>3</ns0:intB>
  </ns0:Add>
查看更多
登录 后发表回答