|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-04-30 11:05 UTC] jani@php.net
[2009-05-08 01:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 02 13:00:01 2025 UTC |
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 "-"