php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #46175 SOAP headers containing a "-" can't be handled
Submitted: 2008-09-25 20:56 UTC Modified: 2009-05-08 01:00 UTC
From: volwol at yahoo dot com Assigned:
Status: No Feedback Package: SOAP related
PHP Version: 5.2.6 OS: Windows
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: volwol at yahoo dot com
New email:
PHP Version: OS:

 

 [2008-09-25 20:56 UTC] 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 "-"

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-04-30 11:05 UTC] jani@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/


 [2009-05-08 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 12:01:31 2024 UTC