From: guillaume dot lintot at laposte dot net Operating system: Windows PHP version: 5.5.2 Package: SOAP related Bug Type: Feature/Change Request Bug description:Return multiple SoapVar in SoapServer
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 bug report at https://bugs.php.net/bug.php?id=65494&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=65494&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=65494&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=65494&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=65494&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=65494&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=65494&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=65494&r=needscript Try newer version: https://bugs.php.net/fix.php?id=65494&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=65494&r=support Expected behavior: https://bugs.php.net/fix.php?id=65494&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=65494&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=65494&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=65494&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=65494&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=65494&r=dst IIS Stability: https://bugs.php.net/fix.php?id=65494&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=65494&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=65494&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=65494&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=65494&r=mysqlcfg