473,386 Members | 1,630 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

uninitialized constant HelloMessageController::HelloMessageApi

Hi,
I practice some examples but i couldn't run it well

hello_message_controller.rb:
Expand|Select|Wrap|Line Numbers
  1.  
  2. class HelloMessageController < ApplicationController
  3.  
  4.   web_service_api HelloMessageApi
  5.     wsdl_service_name 'hello_message'
  6.         web_service_scaffold :invoke
  7.  
  8.   def hello_message(firstname, lastname)
  9.     return "Hello" + firstname+" "+lastname
  10.   end
  11.  
  12. end
  13.  
  14.  
Hello_message_api.rb:
Expand|Select|Wrap|Line Numbers
  1.  
  2. class HelloMessageApi < ActionWebService::API::Base
  3.   api_method :hello_message, expects => [{:firstname=>:string},
  4.     {:lastname=>string}], :returns=>[:string]
  5. end
  6.  
  7.  
when i open localhost:3000/hello_message/invoke
i got the following error:

NameError in Hello messageController#invoke

uninitialized constant HelloMessageController::HelloMessageApi

Any one help me why this error occur and how can we overcome this error?

Thanks in Advance!
Jul 6 '11 #1
0 2355

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: rk | last post by:
Hi, I'm a beginner for perl/cgi programs and i tried to write a cgi script and when i ran it, i got the following error. But when i verified it from the book i typed exactly whatever it is there...
2
by: Liang | last post by:
Hi, I use "defined $r_libs->{$name}" to check first if a key exists in a hash table. But Perl gives a warning WHENEVER the key exists: "Use of uninitialized value". Would u please help to...
15
by: Lasse Skyum | last post by:
I have my own string class that I'm generally verry fond of compared to std::string. For that same reason I'm trying to improve a little on it. Since manny objects in my project will contain...
2
by: nan.li.g | last post by:
I have this simple code below. When I compiled it, I got the following error. But after I removed the comment marker(//), i.e. explicitly defined a constructor, it becomes OK. The compiler...
5
by: Ney André de Mello Zunino | last post by:
Hello. Based on this simple test program: class Test {}; int main() { Test t; const Test u;
13
by: rswanster | last post by:
When I compile and run the following: #include <iostream> int main() { bool f; std::cout << f << std::endl; f = not(f); std::cout << f << std::endl; }
21
by: sanjaymeher | last post by:
Hi, Right now addDynamicMemory(char **ptr, int size) method can able to handle if input ptr is intitialized to NULL or something. But how to improve this method to handle uninitialized pointed...
1
by: pillbug | last post by:
Hello, I would like to know what the standard says regarding writing beyond the end of file. For example, in the following program, is the result always the same or is it system dependent? ...
16
by: Gowtham | last post by:
Hi, I had some C code written which initialized a global variable as: FILE *yyerfp = stdout; This used to work fine in older versions of gcc. Now, when I tried to compile this code (with...
1
by: Wiinie | last post by:
Hi all, I am new bird using Ruby, I just occur the problem "uninitialized constant Object::Person (NameError)" can any experts help me? my code is class Person def initialize(fname,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.