title: Consuming PHP webservice(SOAP, WSDL) from ASP.NET C# app - problems with array
body: <p>I have a web service, defined(WSDL) and implemented in PHP. This one is relatively simple, important bits defined as the following:</p>
  
  <pre><code>&lt;message name='registerAccountRequest'&gt;
          &lt;part name='key' type='xsd:string'/&gt; &lt;!-- key --&gt;
          &lt;part name='data' type='xsd:array'/&gt; &lt;!-- account data --&gt;
  &lt;/message&gt;
  &lt;message name='registerAccountResponse'&gt;
          &lt;part name='success' type='xsd:string' /&gt;
  &lt;/message&gt;
  </code></pre>
  
  <p>Note that data parameter is an array, in fact it is an associative array.
  PHP client works beautifully with this, calling service and getting proper response.</p>
  
  <p>Now, when I try to consume this service with ASP.NET... what do I use as an associative array? Hashtable?.. Proxy class created by Visual Studio says that second parameter is actually a string(or should be string) and not any type of collection...</p>
  
  <p>Quite puzzling...</p>
  
  <p><strong>Addendum:</strong>
  I tried grabbing SOAP request that PHP generates, here is a part of it that carries 'data' parameter:</p>
  
  <pre><code>...&lt;data xsi:type="ns2:Map"&gt;
       &lt;item&gt;
         &lt;key xsi:type="xsd:string"&gt;company_data&lt;/key&gt;
         &lt;value xsi:type="ns2:Map"&gt;
           &lt;item&gt;
             &lt;key xsi:type="xsd:string"&gt;name&lt;/key&gt;
             &lt;value xsi:type="xsd:string"&gt;Test company name&lt;/value&gt;
           &lt;/item&gt;
           &lt;item&gt;
             &lt;key xsi:type="xsd:string"&gt;slogan&lt;/key&gt;
             &lt;value xsi:type="xsd:string"&gt;Test company slogan&lt;/value&gt;
           &lt;/item&gt;
  </code></pre>
  
  <p>...
  So what data type that ns2:Map is? Is there something that ASP.NET supports that maps onto it cleanly?</p>