Req #65494 [Opn->Csd]: Return multiple SoapVar in SoapServer

From: Date: Tue, 29 May 2018 14:18:34 +0000
Subject: Req #65494 [Opn->Csd]: Return multiple SoapVar in SoapServer
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-215418@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=65494&edit=1 ID: 65494 User updated by: guillaume dot lintot at laposte dot net Reported by: guillaume dot lintot at laposte dot net Summary: Return multiple SoapVar in SoapServer -Status: Open +Status: Closed Type: Feature/Change Request Package: SOAP related Operating System: Windows PHP Version: 5.5.2 Block user comment: N Private report: N New Comment: out of date Previous Comments: ------------------------------------------------------------------------ [2013-08-21 13:08:35] guillaume dot lintot at laposte dot net Description: ------------ 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: --------------- <?php 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="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 />'. '<SOAP-ENV:Body><ns1:Method /></SOAP-ENV:Body></SOAP-ENV:Envelope>'; $soap = new SoapServer(null, array('uri' => '127.0.0.1')); $soap->setClass('Test'); $soap->handle($input); Expected result: ---------------- <ns1:MethodResponse> <var1 xsi:type="xsd:string">value1</var1> <var2 xsi:type="xsd:string">value2</var2> </ns1:MethodResponse> Actual result: -------------- <ns1:MethodResponse> <return xsi:type="xsd:int">2</return> </ns1:MethodResponse> ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=65494&edit=1

« previous php.bugs (#215418) next »