title: PHP Soap request tag empty
body: <p>I'm trying to use php for soap calls to an ASP.net (I'm pretty sure that's the server).</p>
  
  <p>I have issues with a request being sent. I believe this is the important part of the wsdl. (note that I'm inexperienced with SOAP).</p>
  
  <pre><code>&lt;s:element name="GetAssetDetails"&gt;
  &lt;s:complexType&gt;
  &lt;s:sequence&gt;
  &lt;s:element minOccurs="1" maxOccurs="1" name="request" nillable="true" type="tns:AssetDetailsRequest"/&gt;
  &lt;/s:sequence&gt;
  &lt;/s:complexType&gt;
  &lt;/s:element&gt;
  &lt;s:complexType name="AssetDetailsRequest"&gt;
  &lt;s:complexContent mixed="false"&gt;
  &lt;s:extension base="tns:RequestBase"&gt;
  &lt;s:sequence&gt;
  &lt;s:element minOccurs="1" maxOccurs="1" name="AssetGuid" nillable="true" type="s1:guid"/&gt;
  &lt;s:element minOccurs="1" maxOccurs="1" name="AssetId" nillable="true" type="s:int"/&gt;
  &lt;s:element minOccurs="0" maxOccurs="1" name="AssetName" type="s:string"/&gt;&lt;s:element minOccurs="1" maxOccurs="1" name="RequestedInfos" nillable="true" type="tns:AssetInfos"/&gt;
  &lt;/s:sequence&gt;
  &lt;/s:extension&gt;
  &lt;/s:complexContent&gt;
  &lt;/s:complexType&gt;
  </code></pre>
  
  <p>The following XML is giving a correct response (as test I've overwritten __doRequest and put this as the full xml request)</p>
  
  <pre><code>$request = '&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"&gt;
  &lt;soap12:Body&gt;
    &lt;GetAssetDetails xmlns="http://xxxx/..."&gt;
      &lt;request&gt;
        &lt;AssetName&gt;arg1&lt;/AssetName&gt;
        &lt;RequestedInfos&gt;option1 option2&lt;/RequestedInfos&gt;
      &lt;/request&gt;
    &lt;/GetAssetDetails&gt;
  &lt;/soap12:Body&gt;
  &lt;/soap12:Envelope&gt;';
  </code></pre>
  
  <p>So I actually don't need the AssetGuid. However it seems that the WSDL says I have to (however I'm not sure if I interpret this correctly).</p>
  
  <p>Now what I do:</p>
  
  <pre><code>$ap_param = array(
       // 'AssetGuid' =&gt; 'EUAUDYEHDOUIDFHADHSJLKW', // Tried with and without this, random value
      'AssetName'      =&gt; 'arg1',
      'RequestedInfos' =&gt; 'option1 option2'
  );
  $info = $soapClient-&gt;__call("GetAssetDetails", array($ap_param));
  </code></pre>
  
  <p>However in the XML that goes over the wire the request tag is empty:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;soap12:Envelope xmlns:soap12="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="http://xxx/..."
  &lt;soap12:Body&gt;
  &lt;GetAssetDetails&gt;
    &lt;request xsi:nil="true"/&gt;
  &lt;/GetAssetDetails&gt;&lt;/soap12:Body&gt;
  &lt;/soap12:Envelope&gt;
  </code></pre>
  
  <p>The response is:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
  &lt;soap:Body&gt;
    &lt;soap:Fault&gt;
      &lt;soap:Code&gt;&lt;soap:Value&gt;soap:Sender&lt;/soap:Value&gt;&lt;/soap:Code&gt;
      &lt;soap:Reason&gt;&lt;soap:Text xml:lang="en"&gt;Unable to handle request without a valid action parameter. Please supply a valid soap action.&lt;/soap:Text&gt;&lt;/soap:Reason&gt;
      &lt;soap:Detail /&gt;
    &lt;/soap:Fault&gt;
  &lt;/soap:Body&gt;
  &lt;/soap:Envelope&gt;
  </code></pre>
  
  <p>Anyone knows what I'm doing wrong that the request element is empty and doesn't hold my parameters?</p>
  
  <p>Thanks in advance!</p>