Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I send an array in SOAP?

I have a PHP file, which sends SOAP request

$client = new SoapClient('http://xyz');
$client->call('example', array('param1'=>'value2')

I want to do this same request using SoapUI:

<soapenv:Envelope [..]>
   <soapenv:Header/>
   <soapenv:Body>
      <urn:call soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
         <param1 xsi:type="xsd:string">example</param1>
         <param2 xsi:type="xsd:anyType">
            ??
         </param2>
      </urn:call>
   </soapenv:Body>
</soapenv:Envelope>

How do I encode the above example in XML?

like image 321
Chris Avatar asked Mar 23 '26 13:03

Chris


1 Answers

it should be something like that:

<soapenv:Envelope [..]>
   <soapenv:Header/>
   <soapenv:Body>
      <urn:call soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
         <param1 xsi:type="xsd:string">example</param1>
         <param2 xsi:type="xsd:anyType">
            <param1 xsi:type="xsd:string">value2</param1>
         </param2>
      </urn:call>
   </soapenv:Body>
</soapenv:Envelope>
like image 159
Anas Avatar answered Mar 26 '26 02:03

Anas



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!