#46175 [Opn->Fbk]: SOAP headers containing a "-" can't be handled
| From: | jani@php.net | Date: | Thu, 30 Apr 2009 11:05:18 +0000 |
| Subject: | #46175 [Opn->Fbk]: SOAP headers containing a "-" can't be handled | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-136568@lists.php.net to get a copy of this message | ||
ID: 46175
Updated by: jani@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