title: Parse SOAP API using php
body: <p>I am a beginner at SOAP and have been trying to figure how to get get a proper response when I call the SOAP API. I have tried diff method since last 3 days but still have no idea. I have already tried similar questions like this on stackoverflow but somehow they are not working for me.</p>
  <p>I really appreciated your help or response how I may be able to get this done.</p>
  <p>Here's the sample request that I should send:</p>
  <pre><code>POST /wsror/Form.asmx HTTP/1.1
  Host: 10.159.159.1
  Content-Type: text/xml; charset=utf-8
  Content-Length: length
  SOAPAction: &quot;http://apps.in/wsror/GetAllVill&quot;
  
  &lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
  &lt;soap:Envelope xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot; xmlns:soap=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;
    &lt;soap:Body&gt;
      &lt;GetAllVill xmlns=&quot;http://apps.in/wsror&quot;&gt;
        &lt;strTaluka&gt;string&lt;/strTaluka&gt;
        &lt;Username&gt;string&lt;/Username&gt;
        &lt;Password&gt;string&lt;/Password&gt;
      &lt;/GetAllVill&gt;
    &lt;/soap:Body&gt;
  &lt;/soap:Envelope&gt;
  </code></pre>
  <p>here's the response:</p>
  <pre><code>HTTP/1.1 200 OK
  Content-Type: text/xml; charset=utf-8
  Content-Length: length
  
  &lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
  &lt;soap:Envelope xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot; xmlns:soap=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;
    &lt;soap:Body&gt;
      &lt;GetAllVillResponse xmlns=&quot;http://apps.in/wsror&quot;&gt;
        &lt;GetAllVillResult&gt;dataset&lt;/GetAllVillResult&gt;
      &lt;/GetAllVillResponse&gt;
    &lt;/soap:Body&gt;
  &lt;/soap:Envelope&gt;
  </code></pre>
  <p>I have tried fetching response by using below method:</p>
  <pre><code>$soapclient = new SoapClient('sensitive info');
  
  $param=array('sensitive info');
  $response =$soapclient-&gt;GetAllVill($param);
  var_dump($response);
  </code></pre>
  <p>and I get below response:</p>
  <pre><code>object(stdClass)#2 (1) { [&quot;GetAllVillResult&quot;]=&gt; object(stdClass)#3 (1) { [&quot;any&quot;]=&gt; string(6596) &quot;19200Adco 24000Bandora 3001000600020700Beto 30010tqui 001900Bma 300100060Borim 600019Capar  &quot; } } 
  </code></pre>