$options = array(
'login' => $username,
'password' => $password,
);
$client = new SoapClient($wsdl, $options);
Yes, it works! I tried in a solution that I was building and it connects to my customer WS which is with HTTP Basic Auth.
More Related Contents:
- SOAP PHP fault parsing WSDL: failed to load external entity?
- In PHP how can you clear a WSDL cache?
- How to build a correct SOAP request with PHP
- How do I make a request using HTTP basic authentication with PHP curl?
- How to make a PHP SOAP call using the SoapClient class
- SOAP request in PHP with CURL
- REST API – why use PUT DELETE POST GET?
- How to parse SOAP XML?
- Connecting to WS-Security protected Web Service with PHP
- SOAP-ERROR: Parsing WSDL: Couldn’t load from – but works on WAMP
- parse an XML with SimpleXML which has multiple namespaces [duplicate]
- Fatal error: Class ‘SoapClient’ not found
- Disable certificate verification in PHP SoapClient
- How to easily consume a web service from PHP
- How to convert SOAP response to PHP Array?
- SOAP-ERROR: Parsing WSDL: Couldn’t load from
- How do I install soap extension?
- How do I enable –enable-soap in php on linux?
- SoapFault exception: Could not connect to host
- PHP SOAP client that understands multi-part messages?
- converting SOAP XML response to a PHP object or array
- How do I see the actual XML generated by PHP SOAP Client Class?
- Inspect XML created by PHP SoapClient call before/without sending the request
- How to parse SOAP response without SoapClient
- How can I send SOAP XML via Curl and PHP?
- Making a HTTP GET request with HTTP-Basic authentication
- Best way to test for a variable’s existence in PHP; isset() is clearly broken
- Remove useless zero digits from decimals in PHP
- What is an .inc and why use it?
- Replace woocommerce_add_order_item_meta hook in Woocommerce 3.4