Chapter 1. Building Web Service Clients
From a high-level view, web service implementations can be broken down into two categories: servers and clients. I'll show how to create both clients and servers throughout this document. But since you're likely to build more clients throughout your career, I'll start with clients.
Most web services are based on one of three architectures: Representational State Transfer (REST), Simple Object Access Protocol (SOAP), or Extensible Markup Language Remote Procedural Calls (XML-RPC). Web services often offer access via two or more of these architectures. For example, we'll be offering both SOAP and XML-RPC access to clients in the ActionWebService server examples later in this book, so clients can implement the architecture that's easiest for their specific application.
If you're building your web service clients in Ruby and implementing them as part of a Rails application, you are in luck. Building web service clients with Ruby on Rails requires only a few simple steps and involves just a few Ruby libraries. Even better news is that the majority of libraries you use for building clients—CGI, NET, REXML, Soap4r, XSD, and XML-RPC—are automatically loaded by your Rails environment. All you have to worry about is knowing when, how, and where to use each library, and that's just what I'll help you figure out throughout the rest of this document.
If you're wondering why I'm talking about Rails (a server platform) and web service clients in the same breath, ...
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