-
Notifications
You must be signed in to change notification settings - Fork 74
Mikaël DELSOL edited this page Sep 10, 2015
·
20 revisions
-
Basic Authentication work around
- How to generate a package using a WSDL protected by a Basic Authentication?
- [Call a SOAP Web Service using a WSDL protected by a Basic Authentication?](#call-a-soap-web-service-using-a wsdl-protected-by-a-basic-authentication)
$ wget https://phar.wsdltophp.com/wsdltophp.phar
$ ./wsdltophp.phar generate:package \
--urlorpath="http://www.mydomain.com/wsdl.xml" \
--destination="/path/to/where/the/package/must/be/generated/" \
--prefix="MyPackage" \
###############################################
# Here are the Basic Authentication credentials
--login="basic_auth_login" \
--password="basic_auth_password" \
###############################################
--force
use WsdlToPhp\PackageBase\AbstractSoapClientBase;
$options = array(
AbstractSoapClientBase::WSDL_URL => 'http://www.mydomain.com/wsdl.xml',
AbstractSoapClientBase::WSDL_CLASSMAP => \MyPackage\MyPackageClassMap::get(),
###############################################
# Here are the Basic Authentication credentials
AbstractSoapClientBase::WSDL_LOGIN => 'basic_auth_login',
AbstractSoapClientBase::WSDL_LOGIN => 'basic_auth_password',
###############################################
);