# Can SOAP/RSS be served by XSLT transform?

**URL:** <https://www.ruby-forum.com/t/can-soap-rss-be-served-by-xslt-transform/74105>\
**Category:** Rails\
**Created:** [October 30, 2006, 11:02am UTC](https://www.ruby-forum.com/t/can-soap-rss-be-served-by-xslt-transform/74105 "2006-10-30T11:02:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/82dd89/32.png) [@kris](https://www.ruby-forum.com/u/kris)\
**Post date:** [October 30, 2006, 11:02am UTC](https://www.ruby-forum.com/t/can-soap-rss-be-served-by-xslt-transform/74105/1 "2006-10-30T11:02:13Z")

</div>

Hello, I was thinking about have a generic backend (models) that returns  
XML, this XML is then transformed in to XHTML, SOAP, RSS depending on  
what is required by the client, using XSLT templates. Can SOAP be  
constructed in this way? Or do I need I need specific fuctionality to  
deliver web services?

I know of Rails web services which now seem to be defunct in place of  
the more RESTful way of doing things… But I already have a requirment  
for XML output so I was thinking of going down the above route.

Any pitfalls?

Many thanks, K.

---

<div class="post-metadata">

**Author:** ![kris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/82dd89/32.png) [@kris](https://www.ruby-forum.com/u/kris)\
**Post date:** [October 31, 2006, 8:14pm UTC](https://www.ruby-forum.com/t/can-soap-rss-be-served-by-xslt-transform/74105/2 "2006-10-31T20:14:49Z")

</div>

Kris wrote:

> Hello, I was thinking about have a generic backend (models) that returns  
> XML, this XML is then transformed in to XHTML, SOAP, RSS depending on  
> what is required by the client, using XSLT templates. Can SOAP be  
> constructed in this way? Or do I need I need specific fuctionality to  
> deliver web services?
> 
> I know of Rails web services which now seem to be defunct in place of  
> the more RESTful way of doing things… But I already have a requirment  
> for XML output so I was thinking of going down the above route.
> 
> Any pitfalls?
> 
> Many thanks, K.

Is this more suited for asking on the Ruby forum, since it is not  
exactly Rails specific? Maybe it does not fit in with the Rails way of  
doing things. I would however modify/extend the basic Rails setup to  
allow XSLT and a XML backend…

---

<div class="post-metadata">

**Author:** ![kris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/82dd89/32.png) [@kris](https://www.ruby-forum.com/u/kris)\
**Post date:** [November 1, 2006, 10:43am UTC](https://www.ruby-forum.com/t/can-soap-rss-be-served-by-xslt-transform/74105/3 "2006-11-01T10:43:01Z")

</div>

You can certainly use rails to generate XML instead of XHTML. We did  
exactly that, and had an after\_filter that ran it through Xalan to turn  
it into XHTML.

No idea about whether you can do it with soap though, I don’t know  
enough about the details of SOAP. ActionWebService is pretty easy to  
work with though and you should be able to share almost all of the code.

Fred

---

<div class="post-metadata">

**Author:** ![kris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/82dd89/32.png) [@kris](https://www.ruby-forum.com/u/kris)\
**Post date:** [November 7, 2006, 10:49am UTC](https://www.ruby-forum.com/t/can-soap-rss-be-served-by-xslt-transform/74105/4 "2006-11-07T10:49:57Z")

</div>

You could do things this way, but it’s not clear to me why you  
wouldn’t just use Rails’ Web services.

As I understand it, AWS isn’t going to disappear - it just may turn  
into an add-on rather than remaining part of the core Rails package.  
For those (apparently few) of us who use it, AWS is a really powerful,  
elegant way of working; REST makes it simpler to create simple XML  
documents, but the effort involved in turning those documents into  
SOAP or XML-RPC is pretty painful if you code it yourself.

Regards

Dave M.
