A secure by default SoapClient extension for PHP

1.0.0 2013-01-24 22:03 UTC


Build Status


The SecureSoapClient class is an extension of the native PHP SoapClient that uses cURL to make requests.

This ensures that any requests over https are actually secure by default.

The class otherwise acts in exactly the same way as the native SoapClient.


  • PHP 5.3 or higher
  • cURL (tested on 7.21.7)


Via Composer

Just add the following to the require section of your composer.json file

"require": {
    "hades200082/secure-soap-client": "1.0.0",

This will install the version 1.0.0 tag. If you want the very latest bleeding edge version change "1.0.0" to dev-master

Via Direct Download

Download the SecureSoapClient.php file from the repository and include it in your project.


You just instantiate this class instead.

// Note: You must include both a cache_dir and cache_url
// and both should point to the same place.
$options = array('cache_dir' => '/var/www/htdocs/', 'cache_url' => '/');
$SoapClient = new \alc\SecureSoapClient($wsdl, $options);

Then use it just like the native PHP SoapClient class.

Found a bug?

If you can fix it, please do. Submit a pull request with your fix and phpunit tests that identify the bug.

If you can't fix it (or don't want to right now) please submit an issue report here on GitHub.

Want to help?

If you want to help improve this please submit a pull request.