Re: PostgreSQL and SOAP, version 7.4/8.0 - Mailing list pgsql-hackers

From mlw
Subject Re: PostgreSQL and SOAP, version 7.4/8.0
Date
Msg-id 3E84C116.5090209@mohawksoft.com
Whole thread Raw
In response to PostgreSQL and SOAP, version 7.4/8.0  (mlw <pgsql@mohawksoft.com>)
Responses Re: PostgreSQL and SOAP, version 7.4/8.0  (Steve Wampler <swampler@noao.edu>)
List pgsql-hackers
<br /><br /> Jason M. Felice wrote:<br /><blockquote cite="mid20030328171757.GD2018@argo.eraserhead.net"
type="cite"><prewrap="">First, a SOAP query should be posted in SOAP message format, not using the
 
query string as you do.  Second, I like the idea of calling external SOAP
services, but consider creating a language 'soap' you could do with a CREATE
FUNCTION type thing. e.g.

CREATE FUNCTION "foo" (TEXT) RETURNS INTEGER AS'<a class="moz-txt-link-freetext"
href="http://somewhere.com/path/to/.wsdl">http://somewhere.com/path/to/.wsdl</a>','foo'LANGUAGE 'soap';
 

(hmm, it is unclear if this is what you are suggesting or not...)

Second, I hate SOAP because it is too bloated (have you read the spec(s)?).
If you can support xmlrpc instead, you'll save yourself a lot of headaches.
If you got SOAP working, though, I'd use it.  It's more an implementation
thing.</pre></blockquote><br /> Here's the thing, yes I know there are a "lot" of alternatives to SOAP, all with
varyinglevels of "being better than SOAP." It still stands that a SOAP interface would be useful for people.<br /><br
/><blockquotecite="mid20030328171757.GD2018@argo.eraserhead.net" type="cite"><pre wrap="">
 


On Fri, Mar 28, 2003 at 09:01:08AM -0500, mlw wrote: </pre><blockquote type="cite"><pre wrap="">I have been working on
movingsome of my software to a more SOAP 
 
compatible interface. As I was doing it, it occured to me that a generic 
function could be written, in PostgreSQL's new function manager that 
allows multiple columns to be returned, that is a generic SOAP interface.

All one would need do is define what is expected from the SOAP call in 
the "CREATE FUNCTION" statement. Then the generic SOAP function could 
then read what is expected and return the XML/SOAP data as a set of 
results as if it were a subquery.

What is needed is an efficient way to find the data types and names from 
the functions definition. Does anyone know how to do that?

A small program could also parse a WSDL file and write a "CREATE 
FUNCTION" script for the XML as well.

On the flip side, I am also working on a PostgreSQL SOAP interface, 
where one does this:

<a class="moz-txt-link-freetext" href="http://somehost/postgresql?query=">http://somehost/postgresql?query=</a>"select
*from table"
 

And a SOAP compatible resultset is returned.

On a more advanced horizon, one should be able to do this:

select * from localtable, 
mysoap('<a class="moz-txt-link-freetext"
href="http://remotehost/postgresql?query=select">http://remotehost/postgresql?query=select</a>* from foo') as soap 
 
where soap.field = localtable.field;

If we can do that, PostgreSQL could fit into almost ANY service 
environment. What do you guys think? Anyone want to help out?
   </pre></blockquote><pre wrap="">
I have no time to volunteer for projects, but what the hell...!  It's too
cool.  I can't spend much time on it but bounce things off me and I'll
do whatever hacking I can squeeze in.  What soap implementation would you
use for the PostgreSQL plugin?  libsoap, last I checked, is a wee bit 
out of date.  And not documented.</pre></blockquote><br /> I was thinking of using SOAP over HTTP as the protocol, and
aminimalist version at best. If the people want "more" let them add it.<br /><br /> I have an HTTP service class in my
opensource library. It would br trivial to accept a SQL query formatted as a GET request, and then execute the query
and,using libpq, format the result as XML. It should be simple enough to do. <br /><blockquote
cite="mid20030328171757.GD2018@argo.eraserhead.net"type="cite"><pre wrap="">
 

-Jason


---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to <a class="moz-txt-link-abbreviated"
href="mailto:majordomo@postgresql.org">majordomo@postgresql.org</a>
 </pre></blockquote><br />

pgsql-hackers by date:

Previous
From: Kris Jurka
Date:
Subject: Re: Detecting corrupted pages earlier
Next
From: Tom Lane
Date:
Subject: Re: Detecting corrupted pages earlier