title: PHP Soap Client and .NET Web Service
body: <p>Hi everyone Im trying to consume a .NET with PHP using SoapClient but I got the following issue when my php client send the request, the .NET WS doesnt get the request xml on the right format heres my code i hope some one help me, thanks ind advice</p>
  
  <pre><code>class login {
      public $User;
      public $Password;
  }
  
  $logr = new login;
  
  $logr-&gt;User = 'user';
  $logr-&gt;Password = 'pass';
  
  
  try {
      $client = new soapclient ("http://..../Service.asmx?WSDL", array('classmap' =&gt; array('LoginRequest' =&gt; 'login'),));
  
  
      print_r($logr);
      $client -&gt; Login ($logr);
  
  }
  catch (Exception $e) {
      echo "Error!&lt;br /&gt;";
      echo $e -&gt; getMessage ();
  }
  </code></pre>
  
  <p>when i test my .net webserver on a .net application i send this, and it works well</p>
  
  <pre><code>&lt;soap:Envelope
      xmlns:soap="http://schemas.xmlsoap.org/soap/envelope"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:xsd="http://www.w3.org/2011/XMLScheme"&gt;
      &lt;soap:Body&gt;
          &lt;Login
              xmlns="http://tempuri.org"&gt;
              &lt;LoginRequest&gt;
                  &lt;User&gt;user&lt;/User&gt;
                  &lt;Password&gt;pass&lt;/Password&gt;
              &lt;/LoginRequest&gt;
          &lt;/Login
      &lt;/soap:Body&gt;
  &lt;/soap:Envelope&gt;
  </code></pre>
  
  <p>but when i test it on php i get this, and this error Server was unable to process request. ---> Object reference not set to an instance of an object.</p>
  
  <pre><code>&lt;SOAP-ENV:Envelope
          xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope"
          xmlns:ns1="http://tempuri.org"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          &lt;SOAP-ENV:Body&gt;
              &lt;Login
                  xmlns="http://tempuri.com"
                  xso:type="ns1:LoginRequest"&gt;
                      &lt;User&gt;user&lt;/User&gt;
                      &lt;Password&gt;pass&lt;/Password&gt;
              &lt;/Login&gt;
          &lt;/SOAP-ENV:Body&gt;
      &lt;/SOAP-ENV:Envelope&gt;
  </code></pre>