SOAP Cheat Sheet

By Lars Magne Ingebrigtsen

SOAP and WSDL are going the way of the dodo, fortunately. The enterprisey world is buzzing with REST, where you, like, just use an URL to do some RPC. Whodathunk! URLs! Whatever will the come up with next?

For the unfortunate ones among you who still have to deal with SOAP crap, and don't want to install a gazillion SOAP libraries, here's a minimal primer.

  1. Find the WSDL you've been requested to follow.
  2. In there, you'll find the call you want to make. It'll be in the operation tags. For instance:
    <operation name='fetchNews'>
  3. The call will probably take a parameter. It'll look like this:
       <complexType name='FetchNews'>
         <element name='lastPublicationId' type='long'/>
     <message name='DisclosureNewsService_fetchNews'>
      <part element='tns:fetchNews' name='parameters'/>
That's it! You need to know no more.

Create a text file like the one below (which is 92% boilerplate), and POST it to the service, and you'll get some god-awful XML back that you can parse.

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:xsi="" 
<fetchNews xmlns="">

And continue living happily, hoping you'll never actually have to learn what SOAP is really about.

2007-11-20 03:23:34