EDIT:
Got too confusing with so many different edits, so this is where I'm currently at.
I have a HTTPService in my Flex 4 app defined as follows:
<s:HTTPService id="getUserDetails" url="http://localhost:3000/users/getDetails" method="GET"/>
I call this service like this (note: I've checked the network monitor in Flash Builder 4 and the userNameLookup variable is sent correctly):
var userNameLookup:String;
userNameLookup = calleeInput.text;
getUserDetails.send(userNameLookup);
And finally, this is the Ruby on Rails method:
def getDetails
@user = User.find_by_username(:userNameLookup)
render :xml => @user
end
This is the error message in the log:
Processing UsersController#getDetails (for 127.0.0.1 at 2010-04-27 19:24:23) [GET] User Load (0.2ms) SELECT * FROM "users" WHERE ("users"."username" = '--- :userNameLookup ') LIMIT 1
ActionView::MissingTemplate (Missing template users/getDetails.erb in view path app/views):
app/controllers/users_controller.rb:33:ingetDetails'
getDetails'
app/controllers/users_controller.rb:32:in
/usr/local/lib/ruby/1.8/webrick/httpserver.rb:104:inservice'
run'
/usr/local/lib/ruby/1.8/webrick/httpserver.rb:65:in
/usr/local/lib/ruby/1.8/webrick/server.rb:173:instart_thread'
start'
/usr/local/lib/ruby/1.8/webrick/server.rb:162:in
/usr/local/lib/ruby/1.8/webrick/server.rb:162:instart_thread'
start'
/usr/local/lib/ruby/1.8/webrick/server.rb:95:in
/usr/local/lib/ruby/1.8/webrick/server.rb:92:ineach'
start'
/usr/local/lib/ruby/1.8/webrick/server.rb:92:in
/usr/local/lib/ruby/1.8/webrick/server.rb:23:instart'
start'
/usr/local/lib/ruby/1.8/webrick/server.rb:82:in
So it appears that the userNameLookup parameter isn't being referred to correctly? Just a thought, but does it matter that I've set the HTTPService to GET even though it is posting something?