I have built up a simple allication for web service interaction. But the
following error message occured:
uninitialized constant HelloadminController::HelloApi
service api
class HelloApi < ActionWebService::API::Base
api_method :getMsg, :expects => [:name=>:string], :returns =>
[:string]
end
service controller
class HelloController < ApplicationController
wsdl_service_name ''Hello''
web_service_api HelloApi
web_service_scaffold :invoke
def getMsg(name)
"Hello " + name
end
end
client controller
class HelloadminController < ApplicationController
def getMsg
hello_client ActionWebService::Client::Soap.new(HelloApi,
"http://localhost:3001/hello/api")
@service_outputhello_client.getMsg(params[:name])
end
end
--
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
Sathiyaraj Gurusamy
2012-May-24 08:33 UTC
Re: uninitialized constant HelloadminController::HelloApi
Hi, Me too get same error. ruby 1.8.6 rails 1.2.3 Any help regarding this would be greatly appreciated. thanks, sathiya Frank Tsao wrote in post #671657:> I have built up a simple allication for web service interaction. But the > following error message occured: > > uninitialized constant HelloadminController::HelloApi > > > service api > > class HelloApi < ActionWebService::API::Base > api_method :getMsg, :expects => [:name=>:string], :returns => > [:string] > > end > > service controller > > class HelloController < ApplicationController > wsdl_service_name ''Hello'' > web_service_api HelloApi > web_service_scaffold :invoke > > def getMsg(name) > "Hello " + name > > end > end > > > client controller > > class HelloadminController < ApplicationController > def getMsg > hello_client > ActionWebService::Client::Soap.new(HelloApi, > "http://localhost:3001/hello/api") > @service_output> hello_client.getMsg(params[:name]) > end > end-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.