[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-soap
Subject:    [SOAP] Returning data for an Array type
From:       "Dan Joseph" <dmjoseph () gmail ! com>
Date:       2008-07-18 12:09:19
Message-ID: a20394490807180509i4f23e0f4rd127b2bedbccc93e () mail ! gmail ! com
[Download RAW message or body]


Hi,

I have a web service with an array type I am trying to return.  I can't seem
to find the right answers anywhere...

First, the WSDL piece:

    <xsd:complexType name="getQuoteHistory">
        <xsd:complexContent>
            <xsd:restriction base="SOAP-ENC:Array">
                <xsd:sequence>
                    <xsd:element name="id" type="xsd:string"/>
                    <xsd:element name="key" type="xsd:string"/>
                    <xsd:element name="username" type="xsd:string"/>
                    <xsd:element name="password" type="xsd:string"/>
                    <xsd:element name="startdate" type="xsd:string"/>
                    <xsd:element name="enddate" type="xsd:string"/>
                    <xsd:element name="status" type="xsd:string"/>
                </xsd:sequence>
            </xsd:restriction>
        </xsd:complexContent>
    </xsd:complexType>

I am trying to returning a list of quotes.  Basically I pull a query from
the database, select * from quotes, and then return the set.

2 Questions:

1. Do I need to have that as getQuoteHistory[] in the wsdl?

2. What do I put in my php code to return the set of results?

-- 
-Dan Joseph

www.canishosting.com - Plans start @ $1.99/month.

"Build a man a fire, and he will be warm for the rest of the day.
Light a man on fire, and will be warm for the rest of his life."


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic