My website won't connect to salesforce.com through the SOAP API since the disablement of TLS1.0. I have made multiple changes.

I have updated OpenSSL to 1.0.2, changed the ssl.conf file in /etc/httpd/conf.d to include the line

SSLProtocol -all TLSv1.2

I have also upgraded the WSDL file.

In my code I have included the following

$context2 = array(
'trace' => true,
'exceptions' => true,
'cache_wsdl' => WSDL_CACHE_NONE,
'ssl_method' => SOAP_SSL_METHOD_TLS,  
'stream_context' => stream_context_create(array(
'ssl' => array(
            'ciphers' => 'DEFAULT:!TLSv1.0:!SSLv3:+TLSv1.1',
            'crypto_method' =>  STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT
    'connection_timeout' => 15

$connection = new SforcePartnerClient();

//Create the SOAP connection to Salesforce
try {
$connection->createConnection($wsdl, $context2);
} catch (Exception $e) {
drupal_set_message(t('Unable to connect to Salesforce. Check 
  credentials.'), 'error');

The error message I 'm getting is

    Fatal error: SoapClient::__setSoapHeaders(): Invalid SOAP header 
in /soapclient/SforceBaseClient.php on line 326

This was working perfectly since last Friday. I made no changes to code for this problem to happen. I can confirm this is not a username issue because I have tried multiple users and I have reset the security token multiple times .

  • not really my area of expertise, however, "But this still returns a SOAP error." could you share the error? (unless i missed it) – glls Nov 10 '17 at 15:48
  • the error message is " An AJAX HTTP error occured. HTTP Result Code path /support/download/file /ajax/870 " – Stephen O'Connell Nov 10 '17 at 17:49
  • this error happens on decawave.com/support/software when you click on the download button to download a piece of software. – Stephen O'Connell Nov 10 '17 at 17:50
  • Have you tried to change code 'ssl' => array( 'ciphers' => 'DEFAULT:!TLSv1.0:!SSLv3:+TLSv1.1', 'crypto_method' => STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT ), to 'ssl' => array( 'ciphers' => 'DEFAULT:!TLSv1.2:!SSLv3', 'crypto_method' => STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT ), – Patlatus Nov 15 '17 at 21:34
  • yes I tried that just now and with no success! – Stephen O'Connell Nov 16 '17 at 6:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.