Restful action reuse in SOAP webservice

Hi,

I have a problem with the following situation. I need to add SOAP
support (using AWS) in a fully RESTful Rails app.

I really want to reuse the existing restful action logic from the other
controllers (just the actions, not the rendering). Stay DRY right… But
I can’t find a way to do this.

I used render_component(_as_string) for forwarding the request, but this
doesn’t work completely as the instance variables are not available in
the AWS controller afterwards (and the response cannot be generated as
another mime type either, since AWS simply sees that as a single string
while it expects an ActionWebService::Struct for rendering).
I now have a working prototype where I use YAML to transport the
instance variables from the RESTful controllers to the AWS controller
and re-instantiate them there again. But this is not a very serious
option.

Normally you would use filters and partials to reuse code in
controllers, but in this situation I want the whole action logic
(including the already existing filters etc).

Does anybody have an idea how to approach this problem?

Thanks in advance,
Bas