PHP SoapClient Authentication

SoapClientAuth replaces the SoapClient class in PHP. This Soap Client, whose interface and operation is identical to the SoapClient class, will perform HTTP authenticaion for SOAP messages and when downloading WSDL over HTTP & HTTPS.

Out of the box PHPs SoapClient class is unable to authenticate via HTTP when downloading WSDL and is unable to authenticate to web services protected by NTLM authentication. SoapClientAuth however will authenticate to Basic, Digest and NTLM web services even if the WSDL file itself is protected by HTTP authentication.

You should use this class as you would use the SoapClient class and simply provide the username and password to the service in the options (login and password) parameter of the constructor. For Example:

$soapClient = new SoapClientAuth('http://url.to.my/soap/service',
            array(
                'login' => 'username',
                'password' => 'password'
            ));

$soapClient->MyMethod();


Download SoapClientAuth

Requirements:
PHP 5.0
curl

SoapClientAuth is distributed and licensed under the terms of the GNU General Public License.
Copyright tc software © 2011

About tc

tc is a Hull based Computer Programmer with over 15 years experience in Software Development. He has developed countless Multi-Tear Desktop Applications and web applications for business in both the UK and abroad. Currently tc spends most of his time developing web sites / applications in PHP and desktop software in C#
This entry was posted in PHP. Bookmark the permalink.

Comments are closed.