Saturday, 15 December 2007

ActionWebService and Rails 2.0

Well looks like I have to take on supporting this for my BioRails project. Afraid on the client side we are making heavy use of .NET generated client code generated from the WSDL. This is used for the Microsoft office client integration is isn't going to become restful soon. Also have clients using the same historic interface so ended up picking up AWS porting to 2.0.

To install the plugin the following should work:-
script/server plugin http://biorails.org/svn/biorails/plugins/action_web_services
At present all I can say is it passes our in-house test suite for the web services I want. Beyond that I have not had time to go. Had to do a few minor changes to get invoke to work, fully made it display calls sorted by name which have been meaning to do for ages.

Maybe for online services could keep few mongrels up with 1.2.6 dedicated to web service requests after move to 2.0. But as we distributing a software package instead of a service this would be hard on customers.

Basic changes are setting the gem dependencies to allow for use with Rails 2.0
gem 'activesupport', '>= 1.0.2'
gem 'actionpack', '>= 1.6.0'
gem 'activerecord', '>= 1.9.0'
Then the removal for include Reloadable::Deprecated from the code base. This appears to have worked for me. I expect there to be a similar gem soon. Then a number of conversions of render_file to render :text => content in the scaffold code.

Its now back to working on 2.0.1 with my .net client usage pattern. In fact working really well on client side as collections of simple data objects is a common pattern for .net and works well for building the client UI.

10 comments:

davolama1401 said...

what did you have to do to get invoke to work?

Unknown said...

Nice work! We've been slightly stuffed by Rails 2 not having decent ActionWebService support as well.

Only one problem: you need to fix scaffolding.rb line 117 -- it talks about sscaffold_path (note the double-letter error). I think this is what the other commenter is talking about.

Cassio Melo said...

I can't get the plugin, I getting a "Plugin not found" message..

>script/plugin install http://biorails.org/svn/plugins/action_web_services --force
Plugin not found: ["http://biorails.org/svn/plugins/action_web_services"]

Unknown said...

In rails 2.1 version ,while i am installing actionwebservice 1.2.6 it is showing an error actionwebservice requires actionpack<=1.13.6> then how can i install the actionwebservice and do my webservices program related with soap

Krishna said...

It would be great if you can share the each & every step...

Am getting error
script/plugin install http://biorails.org/svn/plugins/action_web_services --force
Plugin not found: ["http://biorails.org/svn/plugins/action_web_services"]

libc said...

I couldn't find an e-mail or a bugtracker to report.

You're ignoring nillable and default settings for arrays.
diff to fix it: http://pastie.org/pastes/313609

mullai said...

Plugin not found: ["http://biorails.org/svn/plugins/action_web_services"] Was this resolved? I am getting the same error

Thanks

hector said...

ruby script/plugin install http://biorails.org/svn/biorails/plugins/a
ction_web_services

Works Perfectly !

mullai said...

Thanks. Hemant. I was able to get the plug in now.

CKO said...

http://biorails.org/svn/plugins/action_web_services
user/pass ?????
I cann't check out.