Bug #65018 [NEW]: SoapHeader problems with SoapServer

From: Date: Wed, 12 Jun 2013 10:20:03 +0000
Subject: Bug #65018 [NEW]: SoapHeader problems with SoapServer
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-179520@lists.php.net to get a copy of this message
From:             guillaume dot lintot at laposte dot net
Operating system: 
PHP version:      Irrelevant
Package:          SOAP related
Bug Type:         Bug
Bug description:SoapHeader problems with SoapServer

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>

-- 
Edit bug report at https://bugs.php.net/bug.php?id=65018&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=65018&r=trysnapshot54
Try a snapshot (PHP 5.3):   https://bugs.php.net/fix.php?id=65018&r=trysnapshot53
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=65018&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=65018&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=65018&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=65018&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=65018&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=65018&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=65018&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=65018&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=65018&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=65018&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=65018&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=65018&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=65018&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=65018&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=65018&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=65018&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=65018&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=65018&r=mysqlcfg



Thread (4 messages)

« previous php.bugs (#179520) next »