title: How to use soap class in php (with example)?
body: <p>I would like to learn the basic usage of SOAP through this (<a href="http://www.webservicex.net/globalweather.asmx?op=GetWeather">weather</a>) example.
  How is it worthy to process this data?</p>
  
  <p>Request:</p>
  
  <pre><code>POST /globalweather.asmx HTTP/1.1
  Host: www.webservicex.net
  Content-Type: application/soap+xml; charset=utf-8
  Content-Length: length
  
  &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"&gt;
    &lt;soap12:Body&gt;
      &lt;GetWeather xmlns="http://www.webserviceX.NET"&gt;
        &lt;CityName&gt;string&lt;/CityName&gt;
        &lt;CountryName&gt;string&lt;/CountryName&gt;
      &lt;/GetWeather&gt;
    &lt;/soap12:Body&gt;
  &lt;/soap12:Envelope&gt;
  HTTP/1.1 200 OK
  Content-Type: application/soap+xml; charset=utf-8
  Content-Length: length
  </code></pre>
  
  <p>Response:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"&gt;
    &lt;soap12:Body&gt;
      &lt;GetWeatherResponse xmlns="http://www.webserviceX.NET"&gt;
        &lt;GetWeatherResult&gt;string&lt;/GetWeatherResult&gt;
      &lt;/GetWeatherResponse&gt;
    &lt;/soap12:Body&gt;
  &lt;/soap12:Envelope&gt;
  </code></pre>