#49530 [NEW]: SOAP header only results in function call when document/literal

From: Date: Fri, 11 Sep 2009 12:20:45 +0000
Subject: #49530 [NEW]: SOAP header only results in function call when document/literal
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-142247@lists.php.net to get a copy of this message
From: sjoerd-php at linuxonly dot nl Operating system: PHP version: 5.3.0 PHP Bug Type: SOAP related Bug description: SOAP header only results in function call when document/literal Description: ------------ When a SOAP header is sent to a webservice which uses SoapServer, a method with the same name as the header is called. However, this only happens when the webservice is document/literal, not when it is rpc/encoded. Reproduce code: --------------- <?php class SoapHandler { function HeaderAuthenticate($header) { header("X-Debug: header was called"); } function login() { } } if ($_GET['doclit']) { $wsdl = 'doclit.wsdl'; // http://pastebin.com/f7b1434d9 } else { $wsdl = 'rpcencoded.wsdl'; // http://pastebin.com/fe989844 } $handler = new SoapHandler(); $server = new SoapServer($wsdl); $server->setObject($handler); $server->handle(); ?> Expected result: ---------------- With both WSDLs, that the HeaderAuthenticate method is called. That is, the X-Debug header contains "header was called" when the HeaderAuthenticate header was sent. Actual result: -------------- The HeaderAuthenticate method is only called with document/literal WSDL. -- Edit bug report at http://bugs.php.net/?id=49530&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=49530&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=49530&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=49530&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=49530&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=49530&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=49530&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=49530&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=49530&r=needscript Try newer version: http://bugs.php.net/fix.php?id=49530&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=49530&r=support Expected behavior: http://bugs.php.net/fix.php?id=49530&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=49530&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=49530&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=49530&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49530&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=49530&r=dst IIS Stability: http://bugs.php.net/fix.php?id=49530&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=49530&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=49530&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=49530&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=49530&r=mysqlcfg

« previous php.bugs (#142247) next »