Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 857AD633592 for ; Tue, 22 Dec 2009 14:56:38 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 56816-03 for ; Tue, 22 Dec 2009 18:56:31 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-iw0-f176.google.com (mail-iw0-f176.google.com [209.85.223.176]) by mail.postgresql.org (Postfix) with ESMTP id CCC2F632B0C for ; Tue, 22 Dec 2009 14:56:30 -0400 (AST) Received: by iwn6 with SMTP id 6so4344412iwn.15 for ; Tue, 22 Dec 2009 10:56:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=Y7KsHTRfzD0gMp2N/lJp6Qs3O3AJ/4wAJ55Dw+DXV6I=; b=dFSlE7ydEj+7WbOTKaEEKDtOnEYXFTpchsCgfxNU94bL24Y+ffEGXtQjXSy5G2egU0 vl+/ehwGG/1va4BeYzcvZBnsNEJuul5zDy76q/JBPYQtY+XGxt9LAtc0wLMDNqmfg7mE dZgzRoWW34qYk/15sZEYKe2SUONoWdl/0uFqA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=MNM4gHV86MXReqCvFEDLVjn3s12gJnN7urqT5fPQ0gvI+TuDH2fM7qzsPjq7KOHxCc AuTIUaQOOpDNrW8B3IkWNAJiyy0vFysNTmXnwmvBXX1jwSmnTCuUEzjONI0PTw1oIHNH 6iJ/IoN4IVq8J5XKRgGXhOYQnwEBMQ1mKug8k= MIME-Version: 1.0 Received: by 10.231.159.198 with SMTP id k6mr1334266ibx.54.1261508189510; Tue, 22 Dec 2009 10:56:29 -0800 (PST) In-Reply-To: <9548ecab-b2b5-422e-86a0-830b24e74a9d@k17g2000yqh.googlegroups.com> References: <9548ecab-b2b5-422e-86a0-830b24e74a9d@k17g2000yqh.googlegroups.com> Date: Tue, 22 Dec 2009 13:56:29 -0500 X-Google-Sender-Auth: ca984726edd23599 Message-ID: <491f66a50912221056o3b028dfia21f6fe6d5d06c7a@mail.gmail.com> Subject: Re: Urgent. Help needed From: Dave Cramer To: MILTOS MILTIADOUS Cc: pgsql-jdbc@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.599 tagged_above=-10 required=5 tests=BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 200912/89 X-Sequence-Number: 20170 Sorry for top posting, but is there an error message ? Dave On Tue, Dec 22, 2009 at 4:07 AM, MILTOS MILTIADOUS wrote: > Hello everyone. > > I am in the final stage of completing my postgraduate thesis LBS & > mobile GIS application. > I have a web server application (restlet style), a google android > client and a postgres/postgis DB. I am using postgres plus ver 8.3. > The web server and the postgres server are installed on a IBM lenovo > T500 notebook, 4G RAM, 2,80 GHz intel core duo, on windows XP PRO O/S > > For a couple days now, I am trying to call a pl/pgsql stored function > using jdbc api which returns a setof rowtype (user defined). > I have to point out that the specific function is running perfectly in > pg ADMIN III. > > I am calling the following function --> > > CREATE OR REPLACE FUNCTION myLocationWrapperFunction(IN is_thematic > boolean, IN poi_type integer, IN requires_table_name boolean, IN > accuracy integer, > IN lon double precision, IN lat double precision, IN user_profile_id > integer) RETURNS SETOF locationBestResults AS $$ > > DECLARE > .. > .. > .. > > .. > .. > .. > RETURN; > END; > $$ LANGUAGE 'plpgsql' VOLATILE STRICT; > > According what I search and study till now, I am trying to call the > function which is found in an xml document on server side using JDBC > API (jar jdbc3 ver 6xxx) methods Statement or PrepareStatement. The > function executes normally various insertations on DB tables, calls > nested functions, creates temporary table, and in localhost (testing > environment) I receive back an HTTP POST status 200 (OK) but without > content (empty entity result). > > The define rowtype is : > > CREATE TYPE locationBestResults AS( > poi_name varchar, > address_street varchar, > address_num integer, > address_zip integer, > phone_num varchar, > image bytea, > image_title varchar, > description varchar, > doc varchar, > link varchar, > status varchar > ); > > I imagine the problem has to do with the correct syntax of the current > function. I using the following query to call the function in PG ADMIN > III: > > select * from myLocationWrapperFunction(false, 0, false, 5, > 33.0415, 34.6723, 71); > > In xml document the function is written as > > =A0SELECT * FR= OM > myLocationWrapperFunction(false, '$poi_type$', false, > '$positional_accuracy$', '$longitude$', '$latitude$', > '$observer_profileid$'); > > I am using StringTemplate to catch and save the input parameters in a > string template which are send via HTTP POST client request (parameter > body). > > > Also, I tried a lot of other methods as > > SELECT > poi_name,address_street,address_num,address_zip, > phone_num,image,image_title,description,doc,link,status > FROM myLocationWrapperFunction(false, '$poi_type$', false, > '$positional_accuracy$', '$longitude$', '$latitude$', > '$observer_profileid$'); > > Additionaly, > > I tried to cast ouput result columns data types without effect > > > Thank u. > > -- > Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-jdbc >