title: PHP & XML - How to generate a soap request in PHP from this XML?
body: <p>I am completly new to SOAP operations.</p>
  
  <p>I have been provided with an XML document (SOAP) to get some collection points for a shipping method.</p>
  
  <p>From the manual located here:</p>
  
  <p><a href="http://privpakservices.schenker.nu/package/package_1.3/packageservices.asmx?op=SearchCollectionPoint" rel="noreferrer">http://privpakservices.schenker.nu/package/package_1.3/packageservices.asmx?op=SearchCollectionPoint</a></p>
  
  <p>I can see that I need to use the following SOAP request:</p>
  
  <pre><code>POST /package/package_1.3/packageservices.asmx HTTP/1.1
  Host: privpakservices.schenker.nu
  Content-Type: text/xml; charset=utf-8
  Content-Length: length
  SOAPAction: "http://privpakservices.schenker.nu/SearchCollectionPoint"
  
  &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"&gt;
    &lt;soap:Body&gt;
      &lt;SearchCollectionPoint xmlns="http://privpakservices.schenker.nu/"&gt;
        &lt;customerID&gt;long&lt;/customerID&gt;
        &lt;key&gt;string&lt;/key&gt;
        &lt;serviceID&gt;string&lt;/serviceID&gt;
        &lt;paramID&gt;int&lt;/paramID&gt;
        &lt;address&gt;string&lt;/address&gt;
        &lt;postcode&gt;string&lt;/postcode&gt;
        &lt;city&gt;string&lt;/city&gt;
        &lt;maxhits&gt;int&lt;/maxhits&gt;
      &lt;/SearchCollectionPoint&gt;
    &lt;/soap:Body&gt;
  &lt;/soap:Envelope&gt;
  </code></pre>
  
  <p>The thing is that i don't know how to send this as a request using PHP, and how to get the response.</p>
  
  <p>Any help to pinpoint me in the right direction, is much appreciated.</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I can read the response data with var_dump. However, I am not able to read individual element data.</p>
  
  <p>I need to read data as below</p>
  
  <pre><code>foreach($parser as $row) {
    echo $row-&gt;customerID;
    echo $row-&gt;key;
    echo $row-&gt;serviceID;  
  }
  </code></pre>