anupammaiti / php-wsdl-creator

Automatically exported from code.google.com/p/php-wsdl-creator
GNU General Public License v3.0
0 stars 0 forks source link

SQL - Result sending as xml response with complex types #26

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. How can I send a associative array (result of a sql-query) as response   
   back to the client.

What I made is:
Create a class.complexTypeproject.php
create a class.project.php
create a server.php --> generate the soap server

All works fine but I when I try send an sql request with more result rows back 
to the client I'm not able to get a fine xml response.

The SQL-Statement is ok. If I have only one Result the xml response is ok and I 
can manage it with ksoap2 for android. 

<SOAP-ENV:Envelope 
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Bod
y><ns1:ComplexTypeArrayProjectResponse><return 
SOAP-ENC:arrayType="xsd:string[6]" xsi:type="ns1:stringArray"><item 
xsi:type="xsd:string">0</item><item xsi:type="xsd:string">Erstes 
Projekt</item><item xsi:type="xsd:string">300</item><item 
xsi:type="xsd:string">1</item><item xsi:type="xsd:string">Zweites 
Projekt</item><item 
xsi:type="xsd:string">2000</item></return></ns1:ComplexTypeArrayProjectResponse>
</SOAP-ENV:Body></SOAP-ENV:Envelope>

What is the expected output? What do you see instead?

<SOAP-ENV:Envelope 
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Bod
y><ns1:ComplexTypeArrayProjectResponse><return 
SOAP-ENC:arrayType="xsd:string[2]" xsi:type="ns1:stringArray"><item 
xsi:type="xsd:string">stdClass Object
(
    [idget] => 0
    [projectname] => Testprojekt 1
    [budget] => 3300

)
</item><item xsi:type="xsd:string">stdClass Object
(
    [idget] => 1
    [projectname] => Testprojekt 2
    [budget] => 5300
)
</item></return></ns1:ComplexTypeArrayProjektResponse></SOAP-ENV:Body></SOAP-ENV
:Envelope>

What version of the product are you using? On what operating system?
php-wsdl 2.3

Please provide any additional information below.

Original issue reported on code.google.com by tom.liew...@gmail.com on 15 Jul 2013 at 12:04