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.
Rodrigo D. (Guest)
on 2006-05-24 22: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 D.
 
Iplan Networks                Datos Personales
removed_email_address@domain.invalid       removed_email_address@domain.invalid
www.iplan.com.ar              www.rorra.com.ar
5031-6303                     15-5695-6027
Kent S. (Guest)
on 2006-05-24 22:55
(Received via mailing list)
On 5/24/06, Rodrigo D. <removed_email_address@domain.invalid> 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
Rodrigo D. (Guest)
on 2006-05-24 23:24
(Received via mailing list)
Thank you


Rodrigo D.
 
Iplan Networks                Datos Personales
removed_email_address@domain.invalid       removed_email_address@domain.invalid
www.iplan.com.ar              www.rorra.com.ar
5031-6303                     15-5695-6027


-----Mensaje original-----
De: removed_email_address@domain.invalid
[mailto:removed_email_address@domain.invalid] En nombre de Kent S.
Enviado el: Miércoles, 24 de Mayo de 2006 03:49 p.m.
Para: removed_email_address@domain.invalid
Asunto: Re: [Rails] array parameters in web services

On 5/24/06, Rodrigo D. <removed_email_address@domain.invalid> 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
removed_email_address@domain.invalid
http://lists.rubyonrails.org/mailman/listinfo/rails
This topic is locked and can not be replied to.