|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-07-16 22:17 UTC] tony2001@php.net
[2005-07-24 01:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 18:00:02 2025 UTC |
Description: ------------ It appears that the constructor of SoapClient is completely ignoring the second argument (options). I am trying to use basic http authentication, but regardless of what I send as the options parameter I get the same result. Reproduce code: --------------- $woptions['soap_version']=SOAP_1_2; $woptions['login']=""; $woptions['password']=""; $client = new SoapClient("http://wsdl_that_uses_basic_HTTP_auth",$woptions); Expected result: ---------------- It should return no errors or warnings. Actual result: -------------- PHP Warning: SoapClient::__construct(http://wsdl_that_uses_basic_HTTP_auth): failed to open stream: HTTP request failed! HTTP/1.1 401 Authorization Required in /var/www/html/engine_cvs/misc_scripts/amazon/soaptest.php on line 8 PHP Warning: I/O warning : failed to load HTTP resource in /var/www/html/engine_cvs/misc_scripts/amazon/soaptest.php on line 8 PHP Fatal error: SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://merchant-api-qa.amazon.com/gateway/merchant-interface-mime' in /var/www/html/engine_cvs/misc_scripts/amazon/soaptest.php on line 8 PHP Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://wsdl_that_uses_basic_HTTP_auth' in /var/www/html/engine_cvs/misc_scripts/amazon/soaptest.php:8 Stack trace: #0 /var/www/html/engine_cvs/misc_scripts/amazon/soaptest.php(8): SoapClient->__construct('http://wsdl_that_uses_basic_HTTP_auth', Array) #1 {main} thrown in /var/www/html/engine_cvs/misc_scripts/amazon/soaptest.php on line 8