title: PHP creates an not needed XML-Tag called item for a SOAP Request
body: <p>Why does my PHP-Script output the item-Tag for each id-Element? These item-Wrapper are not needed, it gives an error on the SOAP-WS Request. I'm using nusoap.</p>
  
  <p>Wrong-XML:</p>
  
  <blockquote>
  <pre><code>&lt;SOAP-ENV:Envelope&gt;
    &lt;SOAP-ENV:Body&gt;
        &lt;ns2475:uploadMetaData xmlns:ns2475="..."&gt;
            &lt;uploadMetaData&gt;
                &lt;mediaNumber xsi:type="xsd:string"&gt;906&lt;/mediaNumber&gt;
                &lt;associations xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="unnamed_struct_use_soapval[2]"&gt;
                    &lt;item&gt;
                        &lt;id xsi:type="xsd:int"&gt;1&lt;/id&gt;
                    &lt;/item&gt;
                    &lt;item&gt;
                        &lt;id xsi:type="xsd:string"&gt;5&lt;/id&gt;
                    &lt;/item&gt;
                &lt;/associations&gt;
            &lt;/uploadMetaData&gt;
        &lt;/ns2475:uploadMetaData&gt;
    &lt;/SOAP-ENV:Body&gt;
  &lt;/SOAP-ENV:Envelope&gt;
  </code></pre>
  </blockquote>
  
  <p>Correct-XML:</p>
  
  <blockquote>
  <pre><code>&lt;SOAP-ENV:Envelope&gt;
    &lt;SOAP-ENV:Body&gt;
        &lt;ns2475:uploadMetaData xmlns:ns2475="..."&gt;
            &lt;uploadMetaData&gt;
                &lt;mediaNumber xsi:type="xsd:string"&gt;906&lt;/mediaNumber&gt;
                &lt;associations xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="unnamed_struct_use_soapval[2]"&gt;
                        &lt;id xsi:type="xsd:int"&gt;1&lt;/id&gt;
                        &lt;id xsi:type="xsd:string"&gt;5&lt;/id&gt;
                &lt;/associations&gt;
            &lt;/uploadMetaData&gt;
        &lt;/ns2475:uploadMetaData&gt;
    &lt;/SOAP-ENV:Body&gt;
  &lt;/SOAP-ENV:Envelope&gt;
  </code></pre>
  </blockquote>
  
  <p>PHP-Code:</p>
  
  <pre><code>$associationslist = array();
  foreach($xml-&gt;xpath('//associations') as $association) {        
      // add existing themes to list
      array_push($associationslist, array('id'=&gt;$association-&gt;id));
  }  
  // add one after looping
  array_push($associationslist, array('id'=&gt;$themeid));
  $client_mediapool-&gt;call('uploadMetaData',array('uploadMetaData'=&gt;array('mediaNumber'=&gt;$mediaid,'associations'=&gt;$associationslist)), $ns);
  </code></pre>
  
  <p>Does any one have an idea?</p>
  
  <p>Thank you.
  Mario</p>