From:             volwol at yahoo dot com
Operating system: Windows
PHP version:      5.2.6
PHP Bug Type:     SOAP related
Bug description:  SOAP headers containing a "-" can't be handled

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 bug report at http://bugs.php.net/?id=46175&edit=1
-- 
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=46175&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=46175&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=46175&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=46175&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=46175&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=46175&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=46175&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=46175&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=46175&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=46175&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=46175&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=46175&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=46175&r=globals
PHP 4 support discontinued:   http://bugs.php.net/fix.php?id=46175&r=php4
Daylight Savings:             http://bugs.php.net/fix.php?id=46175&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=46175&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=46175&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=46175&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=46175&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=46175&r=mysqlcfg

Reply via email to