[Rails] [ANN] WebserviceHelper

Michael Koziarski koziarski at gmail.com
Tue Feb 1 10:22:40 GMT 2005


I don't know if anyone else finds this sort of thing useful.  But I've
been using the following snippet for building REST web services with 
rails:

module ActionController
	class AbstractRequest
		def post_xml
			REXML::Document.new(self.raw_post)
		end
	end
end


On Tue, 1 Feb 2005 16:47:09 +1300, leon breedt <bitserf at gmail.com> wrote:
> On Mon, 31 Jan 2005 13:34:06 +0100, Pelle Braendgaard <pelleb at gmail.com> wrote:
> > Very cool stuff. I will probably use this to add SOAP support for
> > http://soapbx.com
> Hi,
> 
> Just a FYI,
> 
> At the suggestion of Tobias Luetke, I'm going to be generalizing this
> somewhat, in the hope that it will be useful for Rails itself (I
> didn't know web services was one of the 1.0 goals).
> 
> This probably means your API object is going to derive from something
> like ActionService::Base instead of extending WebService.
> 
> Also, you're going to be able to defer creation of the API object
> until much later:
> 
> class ApiController < ApplicationController
>    interface :person { PersonApi.new(@something) }
> end
> 
> The block you pass will be instance_evaled in the controller itself,
> so it will have access to any variables set up by your filters, for
> example.
> 
> Also, XML-RPC support is coming. XML-RPC will most likely work without
> any additional requirements. I.e. the URL the SOAP messages are POSTed
> to will be the same as the one that XML-RPC methods are POSTed to, as
> I can look for SOAPAction HTTP headers to figure out which is which.
> 
> Those are the major changes I see happening. But what you have now
> should tide you over until then...
> 
> Leon
> _______________________________________________
> Rails mailing list
> Rails at lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
> 


-- 
Cheers

Koz


More information about the Rails mailing list