Trouble accessing my web service

i am having some problems accessing my web service from outside the
“invoke” functions…

i have the following backend_controller.rb (1) with this a
backend_api.rb (2)…

when i hit it with:

http://localhost:3000/backend/invoke

everything is fine…

when i try it in irb using (3) i get:

irb(main):316:0> result=server.call(“GetMailingList”,“ddd”)
RuntimeError: HTTP-Error: 400 Bad Request

any ideas?

thanks in advance!

(1)
class BackendController < ApplicationController
web_service_dispatching_mode :direct
wsdl_service_name ‘Backend’
web_service_api BackendApi
web_service_scaffold :invoke

def get_mailing_list(api_key)
key = SiteInfo.find(:first).api_key
unless api_key == key
return “Accesss Denied…”
end
list = Array.new
emails = EmailList.find(:all)
emails.each do |e|
unless e.email_address.blank?
list << e.email_address+“\n”
end
end
list.sort!
end

end

(2)

class BackendApi < ActionWebService::API::Base
api_method :get_mailing_list,
:expects => [:string],
:returns => [[:string]]

api_method :get_forward_optins
end

(3)
require ‘xmlrpc/client’
server = XMLRPC::Client.new(“http://localhost:3000/backend/api”)
result = server.call(“GetMailingList”,“ddd”)

one more addendum to this…

after banging my head on this for a very long time…

i tried it in python, and it works just fine…

so i must be doing something wrong on the ruby end…

dangit…

yet another addendum…

i did get this to work with the AWS as a client…