API-> hello_message_api.rb. class HelloMessageApi < ActionWebService::API::Base api_method :hello_message, :expects => [{:firstname=>:string}, {:lastname=>:string}], :returns => [:string] end controller -> class HelloMessageController < ApplicationController web_service_api HelloMessageApi web_service_dispatching_mode :direct wsdl_service_name ''hello_message'' web_service_scaffold :invoke def hello_message(firstname, lastname) return "Hello "+ firstname +" "+lastname end end but it givesthe following error " uninitialized constant HelloMessageController::HelloMessageApi " plz help me out ?????????? -- Posted via http://www.ruby-forum.com/.
Where is the class HelloMessageApi located ?You will need to include it inside the controller before being able to use it. Thanks & Regards, Dhruva Sagar. Jonathan Swift<http://www.brainyquote.com/quotes/authors/j/jonathan_swift.html> - "May you live every day of your life." On Tue, Aug 25, 2009 at 3:24 PM, Sushrut Sathe < rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > API-> hello_message_api.rb. > > class HelloMessageApi < ActionWebService::API::Base > api_method :hello_message, :expects => [{:firstname=>:string}, > {:lastname=>:string}], :returns => [:string] > > end > > > controller -> > > class HelloMessageController < ApplicationController > > web_service_api HelloMessageApi > web_service_dispatching_mode :direct > wsdl_service_name ''hello_message'' > web_service_scaffold :invoke > > def hello_message(firstname, lastname) > return "Hello "+ firstname +" "+lastname > end > end > > but it givesthe following error > " uninitialized constant HelloMessageController::HelloMessageApi " > plz > help me out ?????????? > -- > 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 -~----------~----~----~----~------~----~------~--~---
I get the same error.. Any solution? On Aug 25, 3:11 am, Dhruva Sagar <dhruva.sa...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Where is the class HelloMessageApi located ?You will need to include it > inside the controller before being able to use it. > > Thanks & Regards, > Dhruva Sagar. > > Jonathan Swift<http://www.brainyquote.com/quotes/authors/j/jonathan_swift.html> > - "May you live every day of your life." > > On Tue, Aug 25, 2009 at 3:24 PM, Sushrut Sathe < > > > > rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: > > > API-> hello_message_api.rb. > > > class HelloMessageApi < ActionWebService::API::Base > > api_method :hello_message, :expects => [{:firstname=>:string}, > > {:lastname=>:string}], :returns => [:string] > > > end > > > controller -> > > > class HelloMessageController < ApplicationController > > > web_service_api HelloMessageApi > > web_service_dispatching_mode :direct > > wsdl_service_name ''hello_message'' > > web_service_scaffold :invoke > > > def hello_message(firstname, lastname) > > return "Hello "+ firstname +" "+lastname > > end > > end > > > but it givesthe following error > > " uninitialized constant HelloMessageController::HelloMessageApi " > > plz > > help me out ?????????? > > -- > > Posted viahttp://www.ruby-forum.com/.
2009/9/6 Phylroy <phylroy.lopez-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:> > I get the same error.. Any solution?I think the solution, as Dhruva Sagar pointed out is possibly to include the rb file in the controller. Colin> > > > > On Aug 25, 3:11 am, Dhruva Sagar <dhruva.sa...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> Where is the class HelloMessageApi located ?You will need to include it >> inside the controller before being able to use it. >> >> Thanks & Regards, >> Dhruva Sagar. >> >> Jonathan Swift<http://www.brainyquote.com/quotes/authors/j/jonathan_swift.html> >> - "May you live every day of your life." >> >> On Tue, Aug 25, 2009 at 3:24 PM, Sushrut Sathe < >> >> >> >> rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: >> >> > API-> hello_message_api.rb. >> >> > class HelloMessageApi < ActionWebService::API::Base >> > api_method :hello_message, :expects => [{:firstname=>:string}, >> > {:lastname=>:string}], :returns => [:string] >> >> > end >> >> > controller -> >> >> > class HelloMessageController < ApplicationController >> >> > web_service_api HelloMessageApi >> > web_service_dispatching_mode :direct >> > wsdl_service_name ''hello_message'' >> > web_service_scaffold :invoke >> >> > def hello_message(firstname, lastname) >> > return "Hello "+ firstname +" "+lastname >> > end >> > end >> >> > but it givesthe following error >> > " uninitialized constant HelloMessageController::HelloMessageApi " >> > plz >> > help me out ?????????? >> > -- >> > Posted viahttp://www.ruby-forum.com/. > > > >
I am running into issues as well. I believe this is due to the fact that Rails stopped providing SOAP support at 2.0 and doesn''t do any longer the ''behind the scenes'' thing it used to do for SOAP. I found a post that explains how to get ActionWebService to work again with SOAP but I lost the link. I''m also working on it so I''ll let you know if I find it. On Aug 25, 5:54 am, Sushrut Sathe <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> API-> hello_message_api.rb. > > class HelloMessageApi <ActionWebService::API::Base > api_method :hello_message, :expects => [{:firstname=>:string}, > {:lastname=>:string}], :returns => [:string] > > end > > controller -> > > class HelloMessageController < ApplicationController > > web_service_api HelloMessageApi > web_service_dispatching_mode :direct > wsdl_service_name ''hello_message'' > web_service_scaffold :invoke > > def hello_message(firstname, lastname) > return "Hello "+ firstname +" "+lastname > end > end > > but it givesthe followingerror > " uninitialized constant HelloMessageController::HelloMessageApi " > plz > help me out ?????????? > -- > Posted viahttp://www.ruby-forum.com/.
Here it is: http://adityakircon.blogsome.com/2009/05/07/how-to-install-actionwebservice-in-rails-2/ On Aug 25, 5:54 am, Sushrut Sathe <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> API-> hello_message_api.rb. > > class HelloMessageApi <ActionWebService::API::Base > api_method :hello_message, :expects => [{:firstname=>:string}, > {:lastname=>:string}], :returns => [:string] > > end > > controller -> > > class HelloMessageController < ApplicationController > > web_service_api HelloMessageApi > web_service_dispatching_mode :direct > wsdl_service_name ''hello_message'' > web_service_scaffold :invoke > > def hello_message(firstname, lastname) > return "Hello "+ firstname +" "+lastname > end > end > > but it givesthe followingerror > " uninitialized constant HelloMessageController::HelloMessageApi " > plz > help me out ?????????? > -- > Posted viahttp://www.ruby-forum.com/.