kids encyclopedia robot

SOAP facts for kids

Kids Encyclopedia Facts
Quick facts for kids
SOAP
Webservice xrpc.png
Family Messaging protocol
Designed by
  • Dave Winer
  • Don Box
  • Bob Atkinson
  • Mohsen Al-Ghosein
First appeared Initially as XML-RPC in June 1998; 27 years ago (June 1998)
Stable release
1.2 / 27 April 2007; 18 years ago (2007-04-27)

SOAP (which used to stand for Simple Object Access Protocol) is like a special set of rules for computers to talk to each other. It helps them exchange information in a structured way, especially when they are part of web services on computer networks.

SOAP uses a format called XML Information Set for its messages. It often relies on common internet rules like Hypertext Transfer Protocol (HTTP) to send these messages. This means computers can send and receive information even if they use different operating systems, like Windows, macOS, or Linux. Because HTTP is used almost everywhere, SOAP lets different computer programs talk to web services and get answers, no matter what language or platform they use.

What Makes SOAP Special?

SOAP is a key part of how web services communicate. It's like the "messaging layer" that helps different parts of a web service talk to each other.

SOAP messages are based on XML, which is a way to organize data. Each SOAP message has three main parts:

  • An envelope: This defines the message's structure and how it should be handled.
  • Encoding rules: These are like instructions for how to represent different types of data.
  • Procedure calls and responses: This is a way to ask a computer to do something and then get its answer.

SOAP has three important features:

  • It's flexible: You can add new features to SOAP, like security or special addressing rules.
  • It's neutral: SOAP can work with many different internet rules, such as HTTP, SMTP, or TCP.
  • It's independent: SOAP can be used with any type of programming model.

Imagine you want to find out the price of a house. An app on your phone could send a SOAP request to a server that has a real-estate database. This request would include details about the house you're looking for. The server would then send back a SOAP response, which is an XML document with the house's price, location, and other features. Since this information comes in a standard format, your app can easily understand and use it.

How Did SOAP Start?

SOAP was first created in June 1998. It was designed by people like Dave Winer, Don Box, Bob Atkinson, and Mohsen Al-Ghosein. It was initially known as XML-RPC.

Later, in 1999, the specification for SOAP was shared with the IETF, a group that helps set internet standards. Then, in 2000, version 1.1 of SOAP was published. Finally, version 1.2 of SOAP became an official recommendation by the W3C on June 24, 2003. This means it's a widely accepted standard for how web services should communicate.

The name "Simple Object Access Protocol" was dropped for version 1.2. So now, SOAP is just "SOAP."

Understanding SOAP Messages

A SOAP message is basically an ordinary XML document. It's built from a few key parts:

Element What it does Is it needed?
Envelope This is the main part that identifies the XML document as a SOAP message. Yes
Header This can contain extra information about the message, like security details. No
Body This holds the main content of the message, like a request or a response. Yes
Fault If something goes wrong while processing the message, this part provides error details. No
SOAP
The structure of a SOAP message

How SOAP Messages Travel

SOAP messages can travel using different internet rules, but HTTP is the most common. HTTP works very well with internet firewalls, which are like security guards for networks. This is a big advantage because it means SOAP messages can easily pass through most network security systems.

SOAP can also use HTTPS, which is a secure version of HTTP. This adds encryption, making the communication even safer.

Why XML for SOAP Messages?

XML Information Set was chosen as the standard format for SOAP messages because it's widely used. Many companies and open-source projects use XML, and there are lots of tools available to work with it.

XML messages are easy for humans to read and help find errors. However, XML can sometimes make messages longer than other formats, which might slow down processing. But special hardware can help speed up XML message processing.

Example SOAP Message

Here's an example of a SOAP message. This message asks for the stock price of AT&T (which has the stock symbol "T").

POST /InStock HTTP/1.1
Host: www.example.org
Content-Type: application/soap+xml; charset=utf-8
Content-Length: 299
SOAPAction: "http://www.w3.org/2003/05/soap-envelope"

<?xml version="1.0"?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:m="http://www.example.org">
  <soap:Header>
  </soap:Header>
  <soap:Body>
    <m:GetStockPrice>
      <m:StockName>T</m:StockName>
    </m:GetStockPrice>
  </soap:Body>
</soap:Envelope>

Good and Bad Things About SOAP

What are the Advantages of SOAP?

  • Works with many protocols: SOAP is designed to work with almost any transport protocol, not just HTTP. This makes it very flexible.
  • Firewall friendly: When SOAP uses HTTP, its messages can easily go through firewalls. This means it works well with existing internet setups.
  • Uses XML features: SOAP benefits from all the features of XML, like being able to handle different languages and being easy to extend.

What are the Disadvantages of SOAP?

  • Can be complex: The name "Simple Object Access Protocol" can be a bit misleading. SOAP can be quite detailed and complex to set up.
  • Messages can be large: Because XML is used, SOAP messages can sometimes be larger than messages using other formats. This can make them slower to process.
  • Less "simple" than other options: Other ways for computers to talk, like REST, are often seen as simpler and faster for many common tasks.

See also

Kids robot.svg In Spanish: Simple Object Access Protocol para niños

  • SOAP with Attachments
  • SOAP with Attachments API for Java
  • SOAP-over-UDP
  • List of web service protocols
  • Message Transmission Optimization Mechanism (MTOM)
  • XML-binary Optimized Packaging (XOP)
  • Extensible User Interface Protocol (XUP) – a SOAP-based UI protocol
  • WebSocket
  • Web Services Security
  • WS-Security based products and services
kids search engine
SOAP Facts for Kids. Kiddle Encyclopedia.