title: PHP SoapClient removing element with name
body: <p>I have a WSDL that has an element that requires an attribute:</p>
  
  <pre><code>&lt;xsd:complexType name="claim"&gt;
    &lt;xsd:annotation&gt;
      &lt;xsd:documentation&gt;Claim Element&lt;/xsd:documentation&gt;
    &lt;/xsd:annotation&gt;
    &lt;xsd:sequence&gt;
      &lt;!-- other elements removed --&gt;
    &lt;/xsd:sequence&gt;
    &lt;xsd:attribute name="claimId" type="xsd:nonNegativeInteger" use="required" /&gt;
  &lt;/xsd:complexType&gt;
  </code></pre>
  
  <p>In terms of generated xml, it should look like:</p>
  
  <pre><code>&lt;claims&gt;
      &lt;claim claimId="1"&gt;
          &lt;!-- elements removed --&gt;
      &lt;/claim&gt;
      &lt;!-- more claims --&gt;
  &lt;/claims&gt;
  </code></pre>
  
  <p>Within a <code>foreach</code> loop I am putting together an array of elements and using the attribute as part of the key:</p>
  
  <pre><code>//$claim = array of key/value pairs
  $claim = [...];
  $claim = new \SoapVar($claim, SOAP_ENC_OBJECT, null, null, 'claim claimId="' . ($key+1) . '"');
  $claims['claim claimId="'.($key+1).'"'] = $claim;
  </code></pre>
  
  <p>When it comes to passing this to the SoapClient, the elements get removed:</p>
  
  <pre><code>//$client = new \SoapClient($wsdl);
  $client-&gt;checkClaims($claims);
  </code></pre>
  
  <p>But all I'm getting is:</p>
  
  <pre><code>&lt;claims /&gt;
  </code></pre>
  
  <p>How do I get my soap client to parse the <code>claim</code> elements correctly in the soap call?</p>