I am trying to expect an array of strings in the webservice api. It says "Typed array input fields not supported yet". Can anybody suggest me how I can expect an array in action_webservices. The code is as given below. class SendInvitesApi < ActionWebService::API::Base api_method :send_mails, :expects => [:invitation_details => InvitationDetailsVO], :returns => [:string] end class InvitationDetailsVO < ActionWebService::Struct member :names, [:string] ##This is an array of strings. end THNX in advance.....
on 2007-06-11 09:06
on 2007-06-11 17:34
:expects => [:invitation_details => InvitationDetailsVO], I'm not sure that you're allowed to tell the api to expect an object defined elswhere, I think it has to be one of the allowed xml types. Plus, what you've defined here is not an array because :expects needs an array anyway if you see what I mean. Try: :expects => [[:invitation_details => :string]] Which will get your api to accept an array of strings. Your :returns method there returns a single string as it stands. If you want to return an array of strings use [[:string]]. steve
on 2007-06-11 17:37
PS. the AWS::Struct stuff is to allow to *return* structures not defined as models. Not to accept them. Plus, in the case you have quoted about you don't need to use a struct because you only have one member which is a normal type (array of string). steve