title: How to make SoapClient request with complex parameters?
body: <p>This is the first time I work with SoapClient on PHP. My task is to create a script to automatically send a Soap request to the server. The correct request in SOAP UI is:</p>
  
  <p>Soap URL: <a href="http://example.com:8181/inventory/soap/inventory-api?wsdl" rel="nofollow">http://example.com:8181/inventory/soap/inventory-api?wsdl</a></p>
  
  <pre><code>&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:inv="http://example.com:8181/inventory-api/"&gt;
     &lt;soapenv:Header/&gt;
     &lt;soapenv:Body&gt;
        &lt;inv:searchStockItemRequest&gt;
           &lt;inv:filter&gt;
              &lt;inv:ItemID&gt;100&lt;/inv:ItemID&gt;
              &lt;inv:ItemID&gt;101&lt;/inv:ItemID&gt;
              &lt;inv:ItemID&gt;102&lt;/inv:ItemID&gt;
           &lt;/inv:filter&gt;
        &lt;/inv:searchStockItemRequest&gt;
     &lt;/soapenv:Body&gt;
  &lt;/soapenv:Envelope&gt;
  </code></pre>
  
  <p>It means: Search the StockItem with ID is 100 or 101 or 102.
  This is my current code.</p>
  
  <pre><code>$xml = '&lt;inv:filter&gt;
              &lt;inv:ItemID&gt;100&lt;/inv:ItemID&gt;
              &lt;inv:ItemID&gt;101&lt;/inv:ItemID&gt;
              &lt;inv:ItemID&gt;102&lt;/inv:ItemID&gt;
           &lt;/inv:filter&gt;';
  $client = new SoapClient(null, array(
      'location' =&gt; 'http://example.com:8181/inventory/soap/inventory-api?wsdl',
      'uri' =&gt; MCA_INVENTORY_WSDL)
  );
  $result = $client-&gt;searchItem(htmlspecialchars($xml));
  </code></pre>
  
  <p>And the result is fault with a message:</p>
  
  <p>"Missing required element {<a href="http://example.com:8181/inventory-api/" rel="nofollow">http://example.com:8181/inventory-api/</a>}filter"</p>
  
  <p>I think that the server cannot detect the above filter element. Anyone please help!!!</p>