ID: 40936 Updated by: [EMAIL PROTECTED] Reported By: steffen dot herndl at gmx dot net -Status: Closed +Status: Bogus Bug Type: SOAP related Operating System: Win XP Pro / LINUX PHP Version: 5.2.1 Assigned To: dmitry
Previous Comments: ------------------------------------------------------------------------ [2007-03-30 13:42:14] steffen dot herndl at gmx dot net Sorry, this was not a bug. I did now a very very simple example an it works now. I'm really sorry. ------------------------------------------------------------------------ [2007-03-30 09:10:39] [EMAIL PROTECTED] I cannot understand the reason of failure ands need more info. It seems that you provide HTTP request headres from other PHP script (I see authorization header but not login/password). Could you please provide PHP code with corresponding HTTP headers that doesn't work and corresponding NuSOAP HTTP headers that works. ------------------------------------------------------------------------ [2007-03-28 13:49:41] steffen dot herndl at gmx dot net Description: ------------ I have problems using PHP-SOAP-Extension over a proxy with required authentication. We are using a "Checkpoint Firewall" The Problem is reproducible under Windows XP Pro and Suse Linux 10 (and probably further systems) and with different PHP Versions (done with 5.1.0, 5.1.2, 5.1.6, 5.2.1). The SoapClient doesn't use the parameters proxy_login and proxy_password for authentication. It only works with parameters for HTTP authentication, but this causes other errors on the webservice. The webservice tries then to autenticate with the proxy credentials. If I specify the options login and password for HTTP authentication, the script will pass the firewall check with the following headers. POST http://(...)/WebService.asmx?WSDL HTTP/1.1 Host: (...) Connection: Keep-Alive User-Agent: PHP-SOAP/5.2.1 Content-Type: application/soap+xml; charset=utf-8; action="http://reg.beb.de/ns/wsdl/FinanceService/2007-03/HelloWorld" Content-Length: 220 Authorization: Basic SGVybmRsUzpzcHJpbmcwNzAz Proxy-Authorization: Basic SGVybmRsUzpzcHJpbmcwNzAz Instead of the firewall error I get an error from the webService. Because of the Authorization-Header the webserver tries to authenticate me, although no authentication is needed. Without firewall the communication works properly. The same request done with nuSoap 0.7.2 and active firewall works too. (But I need to do this with PHP-Extension because of performance reasons) Reproduce code: --------------- $_param_wsdl = "http://(...)/WebService.asmx?WSDL"; $_param_client_opt = array( //HTTP connection through a proxy server "proxy_host" => "123.ab.cde", "proxy_port" => 80, "proxy_login" => "username", "proxy_password" => "password", //DEBUG PURPOSE "trace" => true, "exceptions" => true ); //make CLIENT $SOAPClient = new SoapClient($_param_wsdl, $_param_client_opt); var_dump($SOAPClient); //do REQUEST $result = $SOAPClient->HelloWorld(); var_dump($result); Expected result: ---------------- It should work without errors... Actual result: -------------- Warning: SoapClient::SoapClient(http://(...)/WebService.asmx?WSDL) [function.SoapClient-SoapClient]: failed to open stream: HTTP request failed! HTTP/1.0 401 Unauthorized in C:\htdocs\soap.php on line 37 Warning: SoapClient::SoapClient() [function.SoapClient-SoapClient]: I/O warning : failed to load external entity "http://(...)/WebService.asmx?WSDL" in C:\htdocs\soap.php on line 37 SoapFault Object ( [message:protected] => SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://(...)/WebService.asmx?WSDL' [string:private] => [code:protected] => 0 [file:protected] => C:\htdocs\soap.php [line:protected] => 37 [trace:private] => Array ( [0] => Array ( [file] => C:\htdocs\soap.php [line] => 37 [function] => SoapClient [class] => SoapClient [type] => -> [args] => Array ( [0] => http://(...)/WebService.asmx?WSDL [1] => Array ( [soap_version] => 2 [proxy_host] => 123.ab.cde [proxy_port] => 80 [proxy_login] => username [proxy_password] => password [trace] => 1 [exceptions] => 1 ) ) ) ) [faultstring] => SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://(...)/WebService.asmx?WSDL ' [faultcode] => WSDL ) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=40936&edit=1