So I’ve read the Action Web Service bit of the documentation for a
while, searched around and asked on the IRQ channel and I just can’t
seem to get a simple Hello World type web service up and running with
AWS on Rails.
I have a file called hello_person_api.rb which looks like this:
class HelloPersonAPI < ActionWebService::API::Base
api_method :HelloName, :expects =>[:string], :returns => [:string]
end
I have put that in the /app/apis/ directory. I also have a file named
hello_person.rb which contains this:
class HelloPerson < ApplicationController
def HelloName( name )
return "Hello "+name;
end
end
I have put that in the /app/controllers/ directory.
As far as I can understand it, that ought to do something (although I
have no idea what path things are supposed to be on so they could be
in the wrong place) but when ask it to do anything I get this:
http://localhost:3000/HelloPerson
Routing Error
No route for path: “HelloPerson”
Failure reasons:
<ActionController::Routing::Route “:controller/service.wsdl” when
{:action=>“wsdl”}> failed because no controller found at subpath
helloperson
<ActionController::Routing::Route “:controller/:action/:id” ||
{:id=>nil, :action=>“index”}> failed because no controller found at
subpath helloperson
Any ideas what else I need to do?
thanks,
-ben