Your web pages and XUL apps can speak the native language of web services.
Simple Object Access Protocol (SOAP) is a way for you to run methods (effectively function calls) on a remote server. Commands are formatted as XML documents on the client and sent to the server, which processes the commands and returns an XML-formatted response. This hack introduces SOAP with a simple temperature converter that converts between Fahrenheit and Celsius units.
SOAP is intended for remote servers running a web service, but it can be used on a local server (i.e., your workstation) for debugging purposes. SOAP is a form of object-oriented network programming. Clients connect to objects on the server, send commands, and receive responses in the form of messages.
Parameters in both the command and response are nested in XML elements that specify the name, data type, value, and various other attributes. This makes it relatively simple for both client and server to understand the context of what is being requested. Parameters are no longer just strings to be interpreted on the server, as they are in CGI, because SOAP has the vocabulary necessary to specify parameter types such as numbers, strings, URLs, and even complex types such as structs (tables of names and values, each with their own type).
There are many well-written SOAP tutorials on the Web and in print. A good, quick introduction to server-side SOAP can be found at O'Reilly's Perl.com: