php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #65018 SoapHeader problems with SoapServer
Submitted: 2013-06-12 10:20 UTC Modified: 2013-07-31 12:35 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: guillaume dot lintot at laposte dot net Assigned: dmitry
Status: Closed Package: SOAP related
PHP Version: Irrelevant OS:
Private report: No CVE-ID:
 [2013-06-12 10:20 UTC] guillaume dot lintot at laposte dot net
Description:
------------
SoapHeader::mustUnderstand are ignore in SoapServer context

Test script:
---------------
<?php
	class Tool{
		public function TOKEN($id){
			return new SoapHeader('namespace1', 'TOKEN', $id, true);
		}
		public function Method(){}
	}

	$input = $input =
		'<?xml version="1.0"?>'.PHP_EOL.
		'<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="namespace1"'.
		' xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"'.
		' xmlns:xsd="http://www.w3.org/2001/XMLSchema">'.
		'<SOAP-ENV:Header><ns1:TOKEN soapenv:mustUnderstand="1">abc</ns1:TOKEN></SOAP-ENV:Header>'.
		'<SOAP-ENV:Body><ns1:Method /></SOAP-ENV:Body></SOAP-ENV:Envelope>';

	$soap = new SoapServer(null, array('uri' => '127.0.0.1'));
	$soap->setClass('Tool'); $soap->handle($input);
	$out = ob_get_contents(); ob_end_clean();

	echo $out;
?>

Expected result:
----------------
<ns1:TOKEN soapenv:mustUnderstand="1">abc</ns1:TOKEN>

Actual result:
--------------
<ns1:TOKEN>abc</ns1:TOKEN>

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-06-24 17:16 UTC] felipe@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: dmitry
 [2013-07-31 12:34 UTC] dmitry@php.net
Automatic comment on behalf of dmitry@zend.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=fd8f45452032720d3239af2106434232c95249e2
Log: Fixed bug #65018 (SoapHeader problems with SoapServer)
 [2013-07-31 12:34 UTC] dmitry@php.net
-Status: Assigned +Status: Closed
 [2013-07-31 12:35 UTC] dmitry@php.net
The fix for this bug has been committed.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Mon Apr 21 10:02:10 2014 UTC