Skip to Content
Web Services on Rails
book

Web Services on Rails

by Kevin Marshall
May 2006
Intermediate to advanced
32 pages
1h 2m
English
O'Reilly Media, Inc.
Content preview from Web Services on Rails

SOAP and XML-RPC Web Service Servers

Rails comes with a component called ActionWebService (often referred to as AWS) that makes hosting SOAP and XML-RPC web services simple and efficient. ActionWebService allows you to make SOAP and XML-RPC methods available by binding your web service to controllers in your Rails application. It takes care of almost all the technical details for you: parsing the XML request, creating the XML response, and even creating the appropriate WSDL file for your SOAP service. This all means you're free to focus on your business logic, without having to worry about all the protocol specifics.

To update your version of ActionWebService, or to install it independently of Rails, use the gem command:

gem install actionwebservice

AWS supports many of the common Rails tools to speed up the development cycle. It includes a web_service_scaffold method and a script to generate the base files, code, and some functional tests:

script/generate web_service YOURSERVICE YOURMETHOD1 YOURMETHOD2

All of this makes building web services with AWS very easy—though we will skip the use of these convenience tools in order to give a more detailed explanation of

the steps involved in creating your servers. There are only three simple steps you need to follow:

  1. Determine which dispatching mode fits your needs (Direct, Delegated, or Layered).

  2. Create your Application Programming Interface (API), providing the details about the methods you'll make available.

  3. Create your methods (either in controllers ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Rails Crash Course

Rails Crash Course

Anthony Lewis
Agile Web Development with Rails 5.1

Agile Web Development with Rails 5.1

Sam Ruby, David B. Copeland, Dave Thomas

Publisher Resources

ISBN: 0596527969Errata