How to return List in web services througth ActionWebService

I need to return list of objects(e.g. users, articles etc) through

ActionWebService::API::Base

class BabyWiseApi < ActionWebService::API::Base

api_method :is_new_update_available,
:expects => [{:login=>:string},
{:lastUpdatePerformed=>:date}],
:returns => [:boolean]

api_method :get_baby_growth_articles,
:expects => [{:userid=>:string}, {:lastUpdateDate=>:date}],
:returns => [Article]

api_method :get_quotes,
:expects => [{:userid=>:string}, {:lastUpdateDate=>:date}],
:returns => [:string]
end

this is how i m returning , it works fine at the server end.

but when i write a client application to call the methods of web service
there i have to define the same api class , like i mentioned up.

the problem i m facing iz , in the client side it does recognize
“Article” object as there is not any model defined at the clinet end.

please tell me if there is any other way to return the list of objects
and how to get that list.

thx in advance

On Tue, Jun 23, 2009 at 10:58 PM, Hamid R. <
[email protected]> wrote:

        :returns => [:boolean]

and how to get that list.

thx in advance

Posted via http://www.ruby-forum.com/.

How are you calling it and what error messages are you receiving?

-Conrad

web_client_api :baby_wise , :soap,
http://localhost:3000/baby_wise/api”, :service_name => ‘baby_wise’

these are the properties i defined in the client controller

and

baby_wise.get_baby_growth_articles(params[“user_id”],params[:new_update][“new_update”])

this is how m calling function of web service ,

and the api i already mentioned.

it simply says that undefined method Article , simply it doesn’t
recognize the Article object.

as there isn’t any model with that name in the client end but it is in
the server end therefore server side recognize it.