function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
DecaWave WebsiteDecaWave Website 

Website not connecting to salesforce.com through Soap API since the removal of TLS1.0


0down votefavoriteMy 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