title: is there a way to pass a null using PHP SOAP Client when element type is int in wsdl?
body: <p>I'm using the PHP SOAP Client to submit an object that includes an ID element defined in the wsdl like this:</p>
  
  <pre><code>&lt;s:element minOccurs="1" maxOccurs="1" name="ID" type="s:int"/&gt;
  </code></pre>
  
  <p>I'm passing the PHP SOAP client an array that includes the ID value like so:</p>
  
  <pre><code>ID' =&gt; string '' (length=0)
  </code></pre>
  
  <p>This results in xml from the SOAP Client that looks like this:</p>
  
  <pre><code>&lt;ns1:ID&gt;0&lt;/ns1:ID&gt;
  </code></pre>
  
  <p>I'd like this to be:</p>
  
  <pre><code>&lt;ns1:ID&gt;&lt;/ns1:ID&gt;
  </code></pre>
  
  <p>I've tried setting the array value for ID to null like this, but it still produces xml with a value of 0.</p>
  
  <pre><code> $myarray["ID"] = null;
  </code></pre>
  
  <p><strong>Question:</strong>
  Is there any way to submit a null value for an int element using the PHP SOAP client?</p>
  
  <p><strong>Update</strong>
  As suggested by 'Nate from Kalamazoo' I changed $myarray["ID"] = null; to:</p>
  
  <pre><code>$myarray["ID"] = array('_' =&gt; '','xsi:nil' =&gt; "true");
  </code></pre>
  
  <p>This resulted in an array element 'ID' that is another array like this:</p>
  
  <pre><code>'ID' =&gt; 
  array (size=2)
    '_' =&gt; ''
    'xsi:nil' =&gt; string 'true'
  </code></pre>
  
  <p>And now the xml looks like:</p>
  
  <pre><code>&lt;ns1:ID&gt;1&lt;/ns1:ID&gt; //where did the 1 come from?
  </code></pre>
  
  <p>Just for clarity here is how I'm using the PHP SOAP client:</p>
  
  <pre><code>$client-&gt;SomeFunction(array('application' =&gt; $myarray));
  </code></pre>
  
  <p>The array being passed to the SOAP client is associative with the element names being used as the XML Element names so I'm guessing the array in the ID element of the array being passed is somehow returning the 1. But either way 'xsi:ni;' does not appear anywhere in the XML.</p>