|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #65494 Return multiple SoapVar in SoapServer
Submitted: 2013-08-21 13:08 UTC Modified: 2018-05-29 14:18 UTC
From: guillaume dot lintot at laposte dot net Assigned:
Status: Closed Package: SOAP related
PHP Version: 5.5.2 OS: Windows
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
32 + 39 = ?
Subscribe to this entry?

 [2013-08-21 13:08 UTC] guillaume dot lintot at laposte dot net
Hi, i want to return multiple value to a SOAP request.
The only solution i find was to generate a random XML and send it back...

Test script:

	class Test{
		public function Method(){
			$var1 = new SoapVar('value1', XSD_STRING);
			$var2 = new SoapVar('value2', XSD_STRING);
			return $var1 + $var2;

	$input =
		'<?xml version="1.0"?>'.PHP_EOL.
		'<SOAP-ENV:Envelope xmlns:SOAP-ENV="" xmlns:ns1="namespace1"'.
		' xmlns:SOAP-ENC="" xmlns:xsi=""'.
		' xmlns:xsd=""><SOAP-ENV:Header />'.
		'<SOAP-ENV:Body><ns1:Method /></SOAP-ENV:Body></SOAP-ENV:Envelope>';

	$soap = new SoapServer(null, array('uri' => ''));
	$soap->setClass('Test'); $soap->handle($input);

Expected result:
	<var1 xsi:type="xsd:string">value1</var1>
	<var2 xsi:type="xsd:string">value2</var2>

Actual result:
	<return xsi:type="xsd:int">2</return>


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2018-05-29 14:18 UTC] guillaume dot lintot at laposte dot net
-Status: Open +Status: Closed
 [2018-05-29 14:18 UTC] guillaume dot lintot at laposte dot net
out of date
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 24 04:01:31 2024 UTC