Forum: Ruby on Rails web service parameters

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Rodrigo D. (Guest)
on 2006-06-01 01:11
(Received via mailing list)
Can I return an structure array from a web service in rails?

I have this:

class CLL_Metadata < ActionWebService::Struct

  member :key,               :string

  member :type,              :string


and I want to do this:

class UnifiedLoginApi < ActionWebService::API::Base

  api_method :GetMetadata,

             :returns => [ [CLL_ Metadata] ]

but when I do:

class UnifiedLoginController < ApplicationController

  wsdl_service_name 'UnifiedLogin'

  web_service_scaffold :invoke

  def GetMetadata(metadata)

    metadata1 =

    metadata1.key = 'fdsafda'

    metadata1.type = '1'

    metadata1.value = '232'

    collection = [ metadata 1]




it throws me an error: Don't know how to cast CLL_Metadatata into Array

Rodrigo D.

Iplan Networks                Datos Personales

removed_email_address@domain.invalid       removed_email_address@domain.invalid <> <>

5031-6303                     15-5695-6027
This topic is locked and can not be replied to.