ID: 46175 Updated by: j...@php.net Reported By: volwol at yahoo dot com -Status: Open +Status: Feedback Bug Type: SOAP related Operating System: Windows PHP Version: 5.2.6 New Comment:
Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Previous Comments: ------------------------------------------------------------------------ [2008-09-25 20:56:34] volwol at yahoo dot com Description: ------------ Using the SoapServer it is possible to parse the SOAP headers. The way it goes is to use the element name as a function name. However, if the WSDL includes a dash ("-") in the header name, it isn't possible to write a function whose name includes a "-" character. Thus, the soap header can't be retrieved directly. Reproduce code: --------------- public function item-list($msg) { $myFile = "c:\tmp.txt"; $fh = fopen($myFile, 'w') ; fwrite($fh, var_export($msg, true)) ; } $server = new SoapServer("Receive Message Service.wsdl") ; $server->addFunction("item-list"); $server->handle(); /* relevant WSDL parts <message name="Header"> <part name="itemPart" element="ns1:item-list"/> </message> <!-- etc --> <input> <soap:body use="literal"/> <soap:header message="tns:Header" part="itemPart" use="literal"/> </input> */ Expected result: ---------------- The header should be printed to c:\tmp.txt but of course an error is thrown. Actual result: -------------- An error about the following line is thrown: public function item-list expected "(" where as "-" ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=46175&edit=1