What is SOAP Junior?

Get the benefits of SOAP without the bloat and use JSON instead of XML.

If you want to create clean, fast AJAX API's then SOAPjr is what you've been looking for. Basically, it's the love-child of SOAP and JR (JSON-RPC) ... but what the hell does that mean and why should you care?

Check out our quick jQuery plugin & Perl server demos ... or keep reading below for some more technical detail

Traditional SOAP is no longer the Simple Object Access Protocol it was initially designed to be. It's bloated and overly verbose making it bandwidth hungry and slow. It's also based on XML, making it expensive to parse and manipulate - especially on mobile or embedded clients. However, it's core Envelope/Head/Body design pattern is really useful for AJAX style API's.

SOAPjr uses a similar Envelope/Head/Body model, but instead of bloated and verbose XML it uses lightweight and easy to manipulate JSON. After all, there's no X in SOAP and it's Envelope/Head/Body concept is not bound in any way to requiring XML.

In contrast to SOAP, JR (JSON-RPC) is overly simplistic and basically tunnels HTTP GET style key/value pairs within a query string using JSON. However, within JR there is no Head/Body separation leaving metadata to pollute the main data space.

SOAPjr combines the best of these two concepts and is designed to create modern AJAX API's that can easily be used by mobile devices, embedded systems or PC browsers.

So how does this make building AJAX API's any easier? Well getting a browser to talk to make XMLHttpRequest calls is easy enough. But the complex part is defining what data structures each request and response will contain, and debugging invisible requests to find out if it's an HTTP transport error, a Server error, a JSON parser error or a web server or DB error. SOAPjr makes all of this simple by providing a simple and clean framework and associated data structures.

SOAPjr even let's you work with and extend common data models across specific domains (e.g. contacts, calendars, payments, etc.) helping standardise API's even further. A common model would be to use POSH, CSS and Microformats at the presentation layer bound together with a Javascript toolkit like jQuery. SOAPjr is the glue between the browser and the Server, and on the Server-side you can use Perl, Java, PHP, Python, Ruby or any HTTP aware language. There's even a range of pre-built SOAPjr toolkits in each of these languages so all you have to do is customise a Javascript callback and a Server-side callback and your application is up and running.

So if you want to create clean, fast AJAX API's then SOAPjr is what you've been looking for.

Latest News

New demonstration SOAPjr site added

Sep 27th 2009

A new site has been added to the demonstration section that shows a live working example of SOAPjr services - see http://SOAPjr.org/demos.html

File upload (related API) added to SOAPjr jquery plugin

Mar 25th 2009

A new version of the jquery plugin that support file uploads using the "related API" has been released. Version 1.3.0 of the SOAPjr jQuery plugin is available on the jQuery plugin site.

File upload (related API) added to SOAPjr CPAN module

Mar 25th 2009

A new version of the perl libs that support file uploads using the "related API" have been uploaded to CPAN. Thanks for the update Sean.

Redhat claim patent on SOAP over CGI

Mar 20th 2009

In 2007 Redhat lodged a patent on SOAP processing over CGI. Yet another great reason to migrate to SOAPjr which uses lightweight JSON instead of XML.

jQuery plugin bug fixes released

Dec 18th 2008

A variety of small bug fixes and tidy ups have been released (see revision history for more details). Version 1.1.2 of the SOAPjr jQuery plugin is available on the jQuery plugin site.

New jQuery plugin API

Dec 12th 2008

Now you can make SOAPjr calls with a single line, configure default settings or automatically validate the "send" or "receive" data against JSON Schemas. Version 1.1.0 of the SOAPjr jQuery plugin is available on the jQuery plugin site.

Creative Commons License
SOAPjr.org by SOAPjr.org is licensed under a Creative Commons Attribution-Share Alike 2.5 Australia License.
Based on a work at SOAPjr.org.