Last updated: February 12, 2019
Get Started with SOAP: How to Clean Up Your Web Services
Disclosure: Your support helps keep the site running! We earn a referral fee for some of the services we recommend on this page. Learn more
SOAP is a highly structured messaging protocol used for building web services. It allows software applications systems to exchange structured information with each other over the web. A classic example of this is a web application that creates product advertisements from Amazon data based upon the content of a webpage.
SOAP vs REST
SOAP and REST (Representational State Transfer) are the two primary methods of handling web services. While they are not mutually exclusive in theory, in practice they are competing solutions — you either pick one or the other.
In general, SOAP is a more “heavy-duty” approach, and is typically favored in enterprise and government systems. REST is a more “light-weight” approach, and is typically favored in consumer applications and in products with rapid-development cycles. Moreover, people working in large development environments (Java and .NET) tend to prefer SOAP, while developers working with more agile scripting languages (Ruby, Python, PHP) tend to prefer REST.
There’s more to it than that, of course. You should read The Difference Between SOAP and REST for a more in-depth explanation.
First, before trying to build anything, you’ll want to get your head around basic SOAP principles. These tutorials provide a general overview of SOAP without getting into the details of specific technologies.
- SOAP Tutorial, a basic introduction from Tutorials Point;
- XML Soap, a very easy-to-follow explanation of SOAP;
- SOAP Basic, an introduction to SOAP principles, from SOAPuser.com, which is a great resource for SOAP information;
- SOAP Web Service Tutorial, a tutorial for Java programmers, covering SOAP and a number of related topics;
- SOAP Web Service Example in Java Using Eclipse, another Java-focused tutorial;
- SOAP – Simple Object Access Protocol, a seven-part tutorial;
Once you have a high-level view of SOAP, you can tackle a few walk-through tutorials. These, of course, are language and platform specific, so you’ll want to use the one that matches your most likely development stack.
- Producing a SOAP Web Service, a walk-through tutorial for Java, using the Spring Tool Suite;
- How to Create a SOAP Client/Server in PHP, a basic video introduction;
- Web Services with Ruby, a step-by-step guide from Tutorials Point;
- Understanding SOAP, a .NET tutorial from Microsoft;
- SOAP Web Services, Chapter 12 of the book Dive Into Python, dealing just with SOAP;
- Consuming a SOAP Web Service Within an iOS App, from Bharani J’s Tech Blog.
SOAP development is all about the tooling, and (unfortunately) most of the available tutorials either don’t provide enough tooling information, or assume you are using a specific tool set (usually created by the company that published the tutorial). We’re giving you a headstart here with a list of some of the more popular tools for developing, deploying, and testing SOAP web services.
SOAP Development Tools
SOAP web service development generally involves a number of tightly-integrated tools: IDEs, WSDL generators, application servers, and web service frameworks. Some of the tools in this list are “full-stack” tools: they provide a single package which covers a number of developer needs. Others only provide one or two critical functions.
- Metro, a full-stack web service tool for Java, built for use with GlassFish, a Java EE7 Application Server;
- Apache Axis2, a Web Services / SOAP / WSDL engine with implementations in Java and C;
- Windows Communication Foundation, a “unified programming model” for building web services, for use with the .NET framework;
- Many SOAP developer use the Eclipse IDE, with help from the SoapUI Plugin;
- PHP has a set of built-in SOAP-related features, but there is also the NuSOAP Toolkit for PHP;
- Soap4R provides SOAP tools for Ruby;
- SOAPpy is a SOAP services library for Python; there is also Spyne which has more active development;
- Soap for Node.js;
- gSoap for C and C++.
SOAP Development Clients
Building SOAP services is only half the story; something has to actually use those services. Applications that consume SOAP services are called “clients.” The tools listed here will help you access SOAP services from within your client applications. (Several of the SOAP Development Tools also provide client development capabilities.)
- SOAPEngine, an Objective-C SOAP client for OS X and iOS development;
- SUDS, a light-weight Python SOAP client;
- PHP’s SOAP features include the SOAP Client Class;
- Savon is a “heavy metal” SOAP client for Ruby; there’s also the handsoap library;
SOAP Testing Clients
These tools will let you access SOAP services for testing and development.
- SOA Client, a Firefox browser add-on for accessing web services and UDDI registries;
- Boomerang — SOAP & REST Client, a Chrome extension for testing SOAP and REST services;
- Generic SOAP Client, an in-browser client for SOAP services — good for quick tests, but not quite suitable for serious development;
- Storm, a full-featured SOAP test client; also see WcfStorm, which supports other service protocols;
- WebServiceStudio, another SOAP test client, this one based on .NET Webservice Studio;
- SoapUI, commercial SOAP testing client, available in a free community edition and a fully-featured, paid premium edition;
- PocketSoap, a SOAP client for Windows; also see the related WSDL Wizard, which parses WSDL files and presents a GUI representation of available operations.
WSDL-based Code Generators
WSDL documents provide a structured, consumable definition of a SOAP web service. Client applications read the WSDL and use it to generate and validate appropriate calls to the service. WSDL code generators automatically convert WSDL documents into a set of callable classes and methods which provide an in-language API to the web service.
- Easy WSDL, “The World’s leading WSDL client generator,” for use with Android and iOS development;
- Wsdl2phpgenerator, a WSDL code generator for PHP.
Several of the above-mentioned full-stack and client development tools include WSDL-based code generation as well.
Books about SOAP
Online tutorials are really helpful for getting started. But, due to the complexities of SOAP architecture, the best way to really get a handle on the entire ecosystem is one of the excellent books on the topic.
- Service Design Patterns: Fundamental Design Solutions for SOAP/WSDL and RESTful Web Services, by Robert Daigneau;
- Understanding Web Services: XML, WSDL, SOAP, and UDDI, by Eric Newcomer;
- Web Services Platform Architecture, by Weerawarana, et al;
- Programming Web Services With SOAP, by Snell, Tidwell, and Kulchenko.
Further Reading and Resources
We have more guides, tutorials, and infographics related to web development:
- XML Resources & Validators: learn all about one of the most important structured data description languages.
- HTML for Beginners — Ultimate Guide: if you want to learn how to hand-code HTML, this really is the ultimate guide.
- CSS3 — Intro, Guides & Resources: learn the details of webpage layout with this introduction and detailed list of resources.
Ultimate Guide to Web Hosting
If you are going to be creating web applications, chances are that you are going to need to host them somewhere. Check out our Ultimate Guide to Web Hosting. It will explain everything you need to know in order to make an informed choice.