nevermind the above posts
i wasnt paying attention

i created a model Sample

changed code to

class TestApi < ActionWebService::API::Base
   api_method :get_me, :returns => [Sample]
end

class MarketdataController < ApplicationController
   ...
  def poll
    Sample.find(:all,:limit =>1)
  end


here i get all sorts of mapping errors

#1
returns => [Sample]    #it should expect a Sample object

i return a Sample.find(:all,:limit=>1)[0]
and i get a "Cannot map Sample to SOAP/OM"

i return a Sample.find(:all,:limit=>1) #which would return an array 
containing Sample objects , it errors out and says
"Don't know how to cast Array to Sample"
thats expected

then i tried this
#2
returns => [[Sample]] #it should expect an array of sample objects ?
i return a sample.find(:all,:limit=>1)
and i get a "Cannot map Array to SOAP/OM"


Any ideas on how to get it to cast properly ?







-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to