Forum: Ruby on Rails array parameters in web services

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
B192011964906cffb106241f99cb4c3f?d=identicon&s=25 Rodrigo Dominguez (rdominguez)
on 2006-05-24 20:32
(Received via mailing list)
I'm working in a web service, actually, I have:


class UnifiedLoginApi < ActionWebService::API::Base

  class CLL_Metadata < ActionWebService::Struct
    member :key,               :string
    member :type,              :string
    member :value,             :string
    member :webapplication_id, :string
    member :user_tenfold_id,   :string
    member :login_username,    :string
  end

  api_method :GetMetadata,
                          :expects => [{:metadata_type => :string},
                            {:metadata_key => :string},
                            {:metadata_value => :value},
                            {:webapplication_id => :string},
                            {:user_tenfold_id => :string},
                            {:login_username => :string}],
                          :returns => [CLL_Answer]
end

The problem is as follows, in the function GetMetadata, I need to
receive an array of CLL_Metadata objects, and not a single CLL_Metadata
object, how can I do it?



Rodrigo Dominguez
 
Iplan Networks                Datos Personales
rdominguez@iplan.com.ar       rorra@rorra.com.ar
www.iplan.com.ar              www.rorra.com.ar
5031-6303                     15-5695-6027
3ccecc71b9fb0a3d7f00a0bef6f0a63a?d=identicon&s=25 Kent Sibilev (Guest)
on 2006-05-24 20:55
(Received via mailing list)
On 5/24/06, Rodrigo Dominguez <rails@rorra.com.ar> wrote:
>     member :user_tenfold_id,   :string
>                           :returns => [CLL_Answer]
> end
>
> The problem is as follows, in the function GetMetadata, I need to
> receive an array of CLL_Metadata objects, and not a single CLL_Metadata
> object, how can I do it?
>

api_method :GetMetadata,
                         :expects => [ { :metadata_type =>
[[CLL_Metadata]] } ],
                         :returns => [CLL_Answer]

--
Kent
---
http://www.datanoise.com
B192011964906cffb106241f99cb4c3f?d=identicon&s=25 Rodrigo Dominguez (rdominguez)
on 2006-05-24 21:24
(Received via mailing list)
Thank you


Rodrigo Dominguez
 
Iplan Networks                Datos Personales
rdominguez@iplan.com.ar       rorra@rorra.com.ar
www.iplan.com.ar              www.rorra.com.ar
5031-6303                     15-5695-6027


-----Mensaje original-----
De: rails-bounces@lists.rubyonrails.org
[mailto:rails-bounces@lists.rubyonrails.org] En nombre de Kent Sibilev
Enviado el: Miércoles, 24 de Mayo de 2006 03:49 p.m.
Para: rails@lists.rubyonrails.org
Asunto: Re: [Rails] array parameters in web services

On 5/24/06, Rodrigo Dominguez <rails@rorra.com.ar> wrote:
>     member :user_tenfold_id,   :string
>                           :returns => [CLL_Answer]
> end
>
> The problem is as follows, in the function GetMetadata, I need to
> receive an array of CLL_Metadata objects, and not a single
CLL_Metadata
> object, how can I do it?
>

api_method :GetMetadata,
                         :expects => [ { :metadata_type =>
[[CLL_Metadata]] } ],
                         :returns => [CLL_Answer]

--
Kent
---
http://www.datanoise.com
_______________________________________________
Rails mailing list
Rails@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails
This topic is locked and can not be replied to.