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
end
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 = CLL_Metadata.new
metadata1.key = 'fdsafda'
metadata1.type = '1'
metadata1.value = '232'
collection = [ metadata 1]
collection
end
end
it throws me an error: Don’t know how to cast CLL_Metadatata into Array
Rodrigo D.
Iplan Networks Datos Personales
[email protected] [email protected]
www.iplan.com.ar http://www.iplan.com.ar/
www.rorra.com.ar http://www.rorra.com.ar/
5031-6303 15-5695-6027