Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
GoogleCodeExporter opened this issue Feb 15, 2016 · 0 comments
Open

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

GoogleCodeExporter opened this issue Feb 15, 2016 · 0 comments

Comments

@GoogleCodeExporter
Copy link

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 [email protected] on 15 Jul 2013 at 12:04

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant