title: Why is PHP SoapClient / Webservice not giving a response?
body: <p>I have a script that consumes a webservice through SOAP. I'm wondering why I don't receive a response from the server/endpoint URL. The other side said that they're receiving my requests so it means the script works. The only problem is that it doesn't give me a response. I also tried to get the last request, last request header and last response but nothing happens. </p>
  
  <p>Do you have any idea why this is happening?</p>
  
  <p>Here's my code:</p>
  
  <pre><code>$wsdl = "http://imupost.co.za/momentum/CRMLeadService.wsdl";
  $momurl = "https://integrationdev.momentum.co.za/sales/CRMService/CRMLeadService_v1_0";
  echo("Post to URL: {$momurl}\n");
  $username = "817221";
  $password = "1234";
  
  echo("&lt;pre&gt;");
  $client = new SoapClient ($wsdl, array('location' =&gt; $momurl, 'style' =&gt; SOAP_DOCUMENT, 'trace' =&gt; 1,  'soap_version' =&gt; SOAP_1_1, 'exceptions' =&gt; true, 'compression' =&gt; SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_GZIP, 'ssl_method' =&gt; SOAP_SSL_METHOD_TLS));
  
  $header='
      &lt;wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"&gt;
          &lt;wsse:UsernameToken wsu:Id="UsernameToken-45"&gt;
              &lt;wsse:Username&gt;'.$username.'&lt;/wsse:Username&gt;
              &lt;wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText"&gt;'.$password.'&lt;/wsse:Password&gt;
          &lt;/wsse:UsernameToken&gt;
      &lt;/wsse:Security&gt;
      ';
  
  $headerSoapVar = new SoapVar($header,XSD_ANYXML); 
  $soapheader = new SoapHeader('wsse', "Security" , $headerSoapVar , true);
  $client-&gt;__setSoapHeaders($soapheader);
  
  $params['createLead'] = array(
      'LeadSourceId' =&gt; '07d3d6fe-7682-e311-a16d-005056b81ea8',
      'AffiliateLeadReference' =&gt; '852800020',
      'Title' =&gt; array('Code' =&gt; '852800018'),
      'Initials' =&gt; 'MH',
      'PreferredName' =&gt; 'Jane',
      'FirstName' =&gt; 'Hudson',
      'LastName' =&gt; 'Craig',
      'PreferredCorrespondenceLanguage' =&gt; array('Code' =&gt; '852800001'),
      'PreferredCommunicationMethod' =&gt; array('Code' =&gt;'852800000'),
      'HomePhoneNumber' =&gt; '0725222427',
      'BusinessPhoneNumber' =&gt; '0725584155',
      'MobilePhoneNumber' =&gt; '0723694259',
      'EmailAddress' =&gt; 'jhudson@gmail.com',
      'Notes' =&gt; 'IMU',
      'ProductCategories' =&gt; array('Code' =&gt; '9c7d3878-5295-e211-9330-005056b81ea8', 'Description' =&gt; 'Health - Personal')
  ); 
  
      $result = $client-&gt;__soapCall("createLead", array($params));
      echo "REQUEST:\n" . htmlentities($client-&gt;__getLastRequest())  . "\n";
      echo "RESPONSE:\n" . $client-&gt;__getLastResponse()  . "\n";
      print_r($client-&gt;__getLastRequestHeaders());
  </code></pre>