BizTalk Utilities CV ,   Jobs ,   Code library  
 
 

What Is SOAP? -  February 26, 2001 Page 1 2 3 4 5 

Transports and RPC

SOAP messages do not dictate either a transport or a convention.  This means that you can use SOAP messages as greeting cards and have them hand-delivered, if that's something that interests you.  The possibilities are endless.  The overwhelming majority of developers, however, are interested in SOAP because it can help them perform remote procedure calls over HTTP.  The specification leaves the possibility for SOAP to be used in a variety of ways, but it specifically describes how to do RPC over HTTP.

The first issue is transport and how SOAP messages travel over HTTP.  The HTTP request-response model matches up well with SOAP.  SOAP requests are transported in the body of a POST or M-POST, and the SOAP response is returned in the HTTP response.  It is important that the Content-Type header indicate that the body is "text/xml" for a SOAP message.  The specification defines one additional HTTP header for SOAP use (not to be confused with SOAP Header), SOAPAction, that can be used to help identify incoming SOAP requests to firewalls.

The second issue is RPC and how SOAP messages can be used to hold RPC data.  The payload (child element) of the Body represents a method call, and the child elements of the call are parameters.  The convention is to use the method name for the request payload and method name + "Response" for the response (ex. Add & AddResponse).  For the response, the specification states that the return value must appear as the first child element of the payload, and that it's name is not important (you know it by its position, not its name).

Below you will find an example of a HTTP-RPC exchange of SOAP messages.  In reality, the messages included in these HTTP requests and responses might not have nice indentations, but it makes the examples more readable.  Both HTTP and RPC are dealt with in detail in the specification, but development tools will take care of most of this for you.  The next page shows an example of how that is done.

 

Sample HTTP Request
POST /soapworkshop/services/id/id.asp HTTP/1.1
Host: xxx.xxx.xxx.xxx
Content-Type: text/xml
Content-Length: nnn
SOAPAction: "http://www.topxml.com/soapworkshop/GetSecretIdentity"

<?xml version="1.0"?>
<S:Envelope = xmlns:S='http://schemas.xmlsoap.org/soap/envelope/' 
 S:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'>
	<S:Body>
		<vb:GetSecretIdentity 
		 xmlns:vb='http://www.topxml.com/soapworkshop/'>
			<codename>Daredevil</codename>
		</vb:GetSecretIdentity>
	</S:Body>
</S:Envelope>
Sample HTTP Response
HTTP/1.1 200 OK
Server: Microsoft-IIS/5.0
Date: Wed, 31 Jan 2001 07:21:19 GMT
MessageType: CallResponse
Content-Length: nnn
Content-Type: text/xml
Expires: Wed, 31 Jan 2001 07:21:20 GMT
Cache-control: private

<?xml version="1.0"?>
<Env:Envelope xmlns:Env="http://schemas.xmlsoap.org/soap/envelope/" 
 Env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
 xmlns:vb='http://www.topxml.com/soapworkshop/">
	<Env:Body>
		<vb:GetSecretIdentityResponse>
			<id>Matt Murdock</id>
		</vb:GetSecretIdentityResponse>
	</Env:Body>
</Env:Envelope>
SOAP Messages Visual Basic Example

 
 

Recent Jobs

A great opportunity to Digital Vide
here is a greate opportunity as a S
A great opportunity as a Network En
A Greate Opportunituy as a SQL Deve
An immediate job opportunity as a B

View all Jobs (Add yours)
View all CV (Add yours)



chicago web site design
free conference call
Host Department NOLIMIT Web Hosting
UK Web Design
Donna karan sunglasses
New Jersey pool contractor
answering service
masks
swimming pool builder
MSN
sunglasses


    Email TopXML  

Front Page Daily Stuff TopXML Forum XML blogs XML Newsgroups BizTalk Biztalk Utilities Biztalk Utilities Tutorial B2B SAP XML Microsoft .NET Dotnet System XML Soapformatter SQLXML XMLserializer XQuery PHP PHP SimpleXML PHP XML Dom PHP XML RPC PHP XSLT Java Java Java XML Xalan Microsoft ASP ASP Schemas XML SQL Server XML XMLDom XSL XSL Tutorial XSLT Stylesheets General Javascript CSS XHTML WAP