Call a webservice from postgresql database. Using gSoap, this project link a C call from postgresql to consume a remote procedure returning a complex type with gSOAP. The result can be used with queryes and joins.
The pgwebserviceproject is a PostgreSQL Community project that is a part of the pgFoundry.
The pgFoundry page for the project is at http://pgfoundry.org/projects/pgwebservice, where you can find downloads, documentation, bug reports, mailing lists, and a whole lot more.