title: SoapClient not working giving error
body: <p>I am using soap call request to below URL using PHP <code>SoapClient</code>.</p>
  
  <p><a href="https://stagingxml.tamarindtours.in/Version1.0/BaseDetails.svc?wsdl" rel="nofollow"><code>https://stagingxml.tamarindtours.in/Version1.0/BaseDetails.svc?wsdl</code></a></p>
  
  <p>I have used follwing code.</p>
  
  <pre><code>$HeaderSecurity = array("UsernameToken"=&gt;array("Username"=&gt;"xxx",
                                            "Password"=&gt;"xxx",
                                  )
  
  );
  
  $client = new SoapClient('https://stagingxml.tamarindtours.in/Version1.0/BaseDetails.svc?wsdl',array('trace' =&gt; 1));
  $header[] = new SoapHeader("http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd","Security",$HeaderSecurity);
  
  $client-&gt;__setSoapHeaders($header);
  //$client-&gt;__setLocation("https://YourTargetLocation/"); if you have wsdl file you don't need to use this line 
  $REsponse = $client-&gt;GetCountries();
  </code></pre>
  
  <p>I am getting following error.</p>
  
  <blockquote>
    <p>Fatal error: Uncaught SoapFault exception: [a:InvalidSecurity] An
    error occurred when verifying security for the message. in
    /opt/lampp/htdocs/wssoap.php:148 Stack trace: #0
    /opt/lampp/htdocs/wssoap.php(148): SoapClient->__call('GetCountries',
    Array) #1 /opt/lampp/htdocs/wssoap.php(148):
    SoapClient->GetCountries() #2 {main} thrown in
    /opt/lampp/htdocs/wssoap.php on line 148</p>
  </blockquote>
  
  <p>Can you please help me out? Thanks.</p>