blob: a77639420c93037768d9da073eda2b16e0d4619d [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<meta name="copyright" content="Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html. Contributors: IBM Corporation - initial API and implementation" />
<meta name="DC.rights.owner" content="(C) Copyright 2000, 2008" />
<meta content="public" name="security" />
<meta content="index,follow" name="Robots" />
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
<meta content="concept" name="DC.Type" />
<meta name="DC.Title" content="SOAP" />
<meta name="abstract" content="SOAP (formerly known as Simple Object Access Protocol) is a lightweight protocol for the exchange of information in a decentralized, distributed environment. A SOAP message is a transmission of information from a sender to a receiver. SOAP messages can be combined to perform request/response patterns." />
<meta name="description" content="SOAP (formerly known as Simple Object Access Protocol) is a lightweight protocol for the exchange of information in a decentralized, distributed environment. A SOAP message is a transmission of information from a sender to a receiver. SOAP messages can be combined to perform request/response patterns." />
<meta content="SOAP, overview, Web services" name="DC.subject" />
<meta content="SOAP, overview, Web services" name="keywords" />
<meta scheme="URI" name="DC.Relation" content="../concepts/cwsstandards.html" />
<meta scheme="URI" name="DC.Relation" content="cws.html" />
<meta scheme="URI" name="DC.Relation" content="cwsinwsa.html" />
<meta scheme="URI" name="DC.Relation" content="../tasks/toverws.html" />
<meta content="XHTML" name="DC.Format" />
<meta content="csoap" name="DC.Identifier" />
<meta content="en-us" name="DC.Language" />
<link href="../../org.eclipse.wst.doc.user/common.css" type="text/css" rel="stylesheet" />
<title>SOAP</title>
</head>
<body id="csoap"><a name="csoap"><!-- --></a>
<h1 class="topictitle1">SOAP</h1>
<div><p>SOAP (formerly known as Simple Object Access Protocol) is a lightweight
protocol for the exchange of information in a decentralized, distributed environment.
A SOAP message is a transmission of information from a sender to a receiver.
SOAP messages can be combined to perform request/response patterns. </p>
<p>SOAP is transport independent but is most commonly carried over HTTP in
order to run with the existing Internet infrastructure.  SOAP enables
the binding and usage of discovered Web services by defining a message path
for routing messages. SOAP is used to query UDDI for Web services. The workbench
supports SOAP 1.1.</p>
<p>SOAP is an XML-based protocol that defines three parts to every message:</p>
<ul>
<li> <span class="uicontrol">Envelope.</span>  The envelope defines a framework
for describing what is in a message and how to process it.  A SOAP message
is an envelope containing zero or more headers and exactly one body. 
The envelope is the top element of the XML document, providing a container
for control information, the address of a message, and the message itself. 
Headers transport any control information such as quality-of-service attributes. 
The body contains the message identification and its parameters.  Both
the headers and the body are child elements of the envelope.</li>
<li> <span class="uicontrol">Encoding rules.</span>  The set of encoding rules
expresses instances of application-defined data types. Encoding rules define
a serialization mechanism that can be used to exchange instances of application-defined
data types. SOAP defines a programming language-independent data type scheme
based on XSD plus encoding rules for all data types defined according to this
model. SOAP encoding is not WS-I compliant and thus the Literal use (which
is no encoding) is suggested for interoperable Web services and required for
WS-I compliance.</li>
<li> <span class="uicontrol">Communication styles.</span> Communications can follow
a remote procedure call (RPC) or message-oriented (Document) format. 
These are discussed below.</li>
</ul>
<div class="section"><h4 class="sectiontitle">Binding styles</h4><p>SOAP supports two different communication
styles:</p>
<blockquote> <p> <span class="uicontrol">Remote procedure call (RPC):</span> 
Invocation of an operation returning a result. Typically used with SOAP encoding,
which is not WS-I compliant.</p>
<p> <span class="uicontrol">Document Style:</span> 
Also known as document-oriented or message-oriented style.  This style
provides a lower layer of abstraction, and requires more programming work.</p>
</blockquote>
</div>
<div class="section"><h4 class="sectiontitle">Encoding styles</h4><p>In distributed computing environments,
encoding styles define how data values defined in the application can be translated
to and from a particular protocol format.  The translation process is
know as serialization and deserialization.</p>
<p>The SOAP specification defines
the SOAP encoding style:</p>
<blockquote> <p> <span class="uicontrol">SOAP encoding:</span> 
The SOAP encoding style allows you to serialize/deserialize values of data
types from the SOAP data model.  This encoding style is defined in the
SOAP 1.1 standard, and is not WS-I compliant.</p>
</blockquote>
<p>WSDL defines the
Literal XML encoding style:</p>
<blockquote> <p> <span class="uicontrol">Literal XML:</span> 
Literal refers to the fact that the document should be read as-is, or unencoded.
The document is serialized as XMI, meaning that the message XML complies with
the Schema in the WSDL. When using Literal encoding, each message part references
a concrete schema definition. Literal encoding is WS-I compliant.</p>
</blockquote>
</div>
<div class="section"><h4 class="sectiontitle">Data model</h4><p>The purpose of the SOAP data model is
to provide a language-independent abstraction for data types used by common
programming language types. It consists of:</p>
<ul>
<li> <span class="uicontrol">Simple XSD types.</span>  For example int, string,
and date.</li>
<li> <span class="uicontrol">Compound types.</span>  There are two kinds of compound
types, <var class="varname">structs</var> and <var class="varname">arrays</var>.  Structs
are named aggregate types in which each element has a unique name or XML tag. 
Arrays have elements that are identified by position, not by name.</li>
</ul>
<p>All elements and identifiers comprising the SOAP data model are defined
in the namespace URI.  The SOAP standard defines the rules for how data
types can be constructed. A project specific XML schema must define the actual
data types. The elements of the SOAP specification are defined in <a href="http://schemas.xmlsoap.org/soap/envelope/" target="_blank">http://schemas.xmlsoap.org/soap/envelope/</a> and
<a href="http://schemas.xmlsoap.org/soap/encoding/" target="_blank">http://schemas.xmlsoap.org/soap/encoding/</a></p>
</div>
<div class="section"><h4 class="sectiontitle">SOAP implementations</h4><p>Different implementations of
the SOAP protocol are available today.  For example, the Apache Foundation
provides Apache SOAP, which grew out of an IBM<sup>®</sup> project called SOAP4J, as well as Apache
Axis and the IBM WebSphere<sup>®</sup> runtime
environments.</p>
</div>
<div class="section"><h4 class="sectiontitle">Mappings</h4><p>A mapping defines an association between
a qualified XML element name, a Java™ class name, and an encoding style. 
The mapping specifies how, under the given encoding, an incoming XML element
with a fully qualified name is converted to a Java class and vice versa.</p>
<p>For more
information on Apache SOAP, refer to <a href="http://xml.apache.org/soap" target="_blank">xml.apache.org/soap</a>  For more information on
SOAP refer to <a href="http://www.w3.org/TR/SOAP" target="_blank">www.w3.org/TR/SOAP</a> </p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="../concepts/cwsstandards.html" title="One of the key attributes of Internet standards is that they focus on protocols and not on implementations. The Internet is composed of heterogeneous technologies that successfully interoperate through shared protocols. This prevents individual vendors from imposing a standard on the Internet. Open Source software development plays a crucial role in preserving the interoperability of vendor implementations of standards.">Web services standards</a></div>
</div>
<div class="linklist"><strong>Related Concepts</strong><br />
<div><a href="cws.html" title="A Web service is a set of related application functions that can be programmatically invoked over the Internet. Businesses can dynamically mix and match Web services to perform complex transactions with minimal programming. Web services allow buyers and sellers all over the world to discover each other, connect dynamically, and execute transactions in real time with minimal human interaction.">Web services overview</a></div>
<div><a href="cwsinwsa.html" title="">Tools for Web services development</a></div></div>
<div class="linklist"><strong>Related Tasks</strong><br />
<div><a href="../tasks/toverws.html"> Developing Web
services</a></div></div>
</div>
</body>
</html>