How to send hashed data in SOAP request body?

Posted by understack on Stack Overflow See other posts from Stack Overflow or by understack
Published on 2010-05-24T13:13:20Z Indexed on 2010/05/28 5:11 UTC
Read the original article Hit count: 350

Filed under:
|
|

I want to imitate following request using Zend_Soap_Client for this wsdl.

<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:clr="http://schemas.microsoft.com/soap/encoding/clr/1.0" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
 <SOAP-ENV:Header>
<h3:__MethodSignature xsi:type="SOAP-ENC:methodSignature" 
xmlns:h3="http://schemas.microsoft.com/clr/soap/messageProperties" SOAP-ENC:root="1"
xmlns:a2="http://schemas.microsoft.com/clr/ns/System.Collections">xsd:string a2:Hashtable</h3:__MethodSignature>
 </SOAP-ENV:Header>

 <SOAP-ENV:Body>
  <i4:ReturnDataSet id="ref-1" xmlns:i4="http://schemas.microsoft.com/clr/nsassem/Interface.IRptSchedule/Interface">
   <sProc id="ref-5">BU</sProc>
   <ht href="#ref-6"/>
  </i4:ReturnDataSet><br/>

  <a2:Hashtable id="ref-6" xmlns:a2="http://schemas.microsoft.com/clr/ns/System.Collections">
   <LoadFactor>0.72</LoadFactor>
   <Version>1</Version>
   <Comparer xsi:null="1"/>
   <HashCodeProvider xsi:null="1"/>
   <HashSize>11</HashSize>
   <Keys href="#ref-7"/>
   <Values href="#ref-8"/>
  </a2:Hashtable>

  <SOAP-ENC:Array id="ref-7" SOAP-ENC:arrayType="xsd:anyType[1]">
   <item id="ref-9" xsi:type="SOAP-ENC:string">@AppName</item>
  </SOAP-ENC:Array><br/>

  <SOAP-ENC:Array id="ref-8" SOAP-ENC:arrayType="xsd:anyType[1]">
   <item id="ref-10" xsi:type="SOAP-ENC:string">AAGENT</item>
  </SOAP-ENC:Array>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

It seems somehow I've to send hashed "ref-7" and "ref-8" array embedded inside body? How can I do this?

Function ReturnDataSet takes two parameters, how can I send additional "ref-7" and "ref-8" array data?

$client = new SoapClient($wsdl_url, array('soap_version' => SOAP_1_1));
$result = $client->ReturnDataset("BU", $ht);

I don't know how to set $ht, so that hashed data is sent as different body entry.

Thanks.

© Stack Overflow or respective owner

Related posts about php

Related posts about web-services