ruby 开发Web Service 出错了 uninitialized constant HelloMessageController::HelloMessage
API:apis目录下classHelloMessageApi<ActionWebService::API::Baseapi_method:hello_message,:...
API: apis目录下
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
http://localhost:3000/hello_message/wsdl 访问这个网址就会出错,
gem install actionwebservice 已经安装了。
研究好久了,也没找到解决的办法, 在网上查也没有解决的答案。
大家研究一下吧! 展开
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
http://localhost:3000/hello_message/wsdl 访问这个网址就会出错,
gem install actionwebservice 已经安装了。
研究好久了,也没找到解决的办法, 在网上查也没有解决的答案。
大家研究一下吧! 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询