Re: [SOAP] Generic Database Access

From: Date: Fri, 01 Aug 2003 21:52:19 +0000
Subject: Re: [SOAP] Generic Database Access
References: 1  Groups: php.soap 
Request: Send a blank email to php-soap+get-915@lists.php.net to get a copy of this message
Rob, I don't have a solution, just my story. I had a similar problem, I needed to send data across the country from my database here in Seattle (PostgreSQL) to some folks in St. Paul. They used BEA web logics or something, I'm all OpenSource. So the communication is done with SOAP. They send a small SOAP query and I send results back. On some of the queries I send back over 200 records! As you stated adding XML/SOAP overhead for each field is a lot. Since I didn't see any solution (the same you seek) I just decided to brute force it to go and said "F it, I guess I'll have to have that overhead". What about the performance? The sytems can send about 63 records (rows in the DB) per second, really slow compared to direct DB access. However, the average number of records I need to send in any given second is only four. So it works for me. Hope this helps. /B ----- Original Message ----- From: "Rob Booth" <rbooth@indyme.com> To: <soap@lists.php.net> Sent: Friday, August 01, 2003 14:18 Subject: [SOAP] Generic Database Access > Has anyone tried this yet? > > I'm wondering how I would go about building a Web Service that would allow > me to run a query against my database and get back a result set. I don't > really want to get by every row/col wrapped in SOAP because this overhead > would be unwieldly. Is there a more elegant solution that I'm just not > seeing? I was thinking that I could build my own return structure and wrap > it in a single SOAP tag then parse the structure to re-build the row/col > structure on the client side, but this also seems wrong. Any thoughts or > ideas are more than welcome. > > So in example I'd like to be able to send this, or any other, query to my > database: > SELECT name, address1, address2, city, state, zip > FROM users > > And get back my results, but not in a huge SOAP structure like the one below > (only 1 row shown) > <Result xsi:type="ns4:QueryResult"> > <Rows xsi:type="SOAP-ENC:Array" > SOAP-ENC:arrayType="xsd:anyType[100]" > SOAP-ENC:offset="[0]"> > <item xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:string[6]" > SOAP-ENC:offset="[0]"> > <item xsi:type="xsd:string">Rob</item> > <item xsi:type="xsd:string">1234 Main St.</item> > <item xsi:type="xsd:string">Suite 123</item> > <item xsi:type="xsd:string">AnyTown</item> > <item xsi:type="xsd:string">AnyState</item> > <item xsi:type="xsd:string">92837</item> > </item> > > As you can see this would get to be very large with only a few rows, imagine > it with thousands of rows. So I'm hoping that there is an easier/nicer way > to return unknown data from a database using a Web Service. > > Thanks, > Rob > > > > -- > PHP Soap Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.soap (#915) next »