Action Web Service Gem
hi i am using 'actionwebservice' for passing SOAP requests.
Version 2.3.2 for actionwebservice is " datanoise-actionwebservice"
For installing the gem when i used,
gem install datanoise-actionwebservice
got this error,
ERROR: could not find gem datanoise-actionwebservice locally or in a repository
& found this is the right way to install
gem install datanoise-actionwebservice --source http://gems.github.com
Books : Restful Web Services
| Web Services Essentials (O'Reilly XML)
| Web Services: Principles and Technology
| RESTful Web Services Cookbook
Version 2.3.2 for actionwebservice is " datanoise-actionwebservice"
For installing the gem when i used,
gem install datanoise-actionwebservice
got this error,
ERROR: could not find gem datanoise-actionwebservice locally or in a repository
& found this is the right way to install
gem install datanoise-actionwebservice --source http://gems.github.com
Add this line to your config/environment.rb
file in the initializer section:
config.gem 'datanoise-actionwebservice', :lib => 'actionwebservice'
Generating API controller
ActionWebService gem includes web_service
generator that you can use like this:
$ ./script/generate web_service post
Define your API
Open app/services/post_api.rb
file and add methods that your service exposes:
class PostApi < returns =""> [[:string]]
end
API implementation
We are going to use direct dispatching mode, so all methods that implement our API go directly to PostController
itself:
class PostController < ApplicationController
wsdl_service_name 'Post'
web_service_api PostApi
web_service_scaffold :invocation if Rails.env == 'development'
def get_posts
["Post 1", "Post 2"]
end
end
wsdl url:
http://localhost:3000/post/wsdl
Books : Restful Web Services
Comments
I go thru ur blog but I got error after this step------
Add this line to your config/environment.rb file in the initializer section:
config.gem 'datanoise-actionwebservice', :lib => 'actionwebservice'
Server cant start and gives the follwoing error....
Exiting
C:/ruby/lib/ruby/site_ruby/1.8/rubygems/version.rb:300:in `match': can't convert Hash into String (TypeError)
from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/version.rb:300:in `parse'
from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/version.rb:238:in `initialize'
-------- If possible pls help.. its urgent..
Also if I wrote require 'datanoise-actionwebservice' on irb
it says no such file to load !!
Thanks
Minal
wat to do next ?
hav u write any blog on restful webservice
http://weblog.jamisbuck.org/2006/3/27/web-services-rails-style
Any more clarifications abt restful mail me @ sri.jjhero@gmail.com