Bug #66508 [NEW]: The functioin executes error

From: Date: Fri, 17 Jan 2014 16:33:41 +0000
Subject: Bug #66508 [NEW]: The functioin executes error
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-183872@lists.php.net to get a copy of this message
From: lyroe_chan at hotmail dot com Operating system: ubuntu 13.10 PHP version: 5.5.8 Package: SOAP related Bug Type: Bug Bug description:The functioin executes error Description: ------------ --- From manual page: http://www.php.net/class.soapheader --- The SoapClient::SoapHeader() doesn't work as it declares in php.net document. Test script: --------------- $wsdl = 'http://demo-hotelws.touricoholidays.com/HotelFlow.svc?wsdl'; $client = new SoapClient($wsdl, array('trace' => true)); $var = array( 'LoginName' => 'xxxx', 'Password' => 'yyyy', ); $ns = 'http://schemas.tourico.com/webservices/authentication'; $soapheadervar = new SoapVar($var, SOAP_ENC_OBJECT, null, null, null); $soapheader = new SoapHeader($ns, 'AuthenticationHeader', $soapheadervar); $client->__setSoapHeaders($soapheader); $body = array(...); $response = $client->SomeFunction($body); echo "Request:\n".$client->__getLastRequest()."\n"; echo "Response:","\n",$client->__getLastResponse(),"\n"; Expected result: ---------------- <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://tourico.com/webservices/hotelv3"> <SOAP-ENV:Header> <m:AuthenticationHeader xmlns:m='http://schemas.tourico.com/webservices/authentication'> <m:LoginName>xxxx</m:LoginName> <m:Password>yyyy</m:Password> </m:AuthenticationHeader> </SOAP-ENV:Header> <SOAP-ENV:Body> ........ </SOAP-ENV:Body> </SOAP-ENV:Envelope> Actual result: -------------- <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://tourico.com/webservices/hotelv3" xmlns:ns2="http://schemas.tourico.com/webservices/authentication"> <SOAP-ENV:Header> <m:AuthenticationHeader> <m:LoginName>xxxx</m:LoginName> <m:Password>yyyy</m:Password> </m:AuthenticationHeader> </SOAP-ENV:Header> <SOAP-ENV:Body> ........ </SOAP-ENV:Body> </SOAP-ENV:Envelope> -- Edit bug report at https://bugs.php.net/bug.php?id=66508&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=66508&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=66508&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=66508&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=66508&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=66508&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=66508&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=66508&r=needscript Try newer version: https://bugs.php.net/fix.php?id=66508&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=66508&r=support Expected behavior: https://bugs.php.net/fix.php?id=66508&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=66508&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=66508&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=66508&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=66508&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=66508&r=dst IIS Stability: https://bugs.php.net/fix.php?id=66508&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=66508&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=66508&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=66508&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=66508&r=mysqlcfg

« previous php.bugs (#183872) next »