TechBubbles Microsoft Technology BLOG

SOAP Fundamentals


SOAP is  a protocol to exchange the XML messages over the network using HTTP\HTTPS.It stands for Simple Object Access Protocol.It is platform and language independent.

SOAP Building Blocks

A SOAP Message is an XML Document contains the following elements

  • Envelope element which identifies the XML document as a SOAP Message.It is required element in SOAP message.
  • Header element which contains the header information which is an optional element.
  • Body element contains the request and response information which is a required element in SOAP.
  • Fault element contains the error information during the processing of a message.

SOAP Message Syntax

<?xml version="1.0"?>
//Must contain SOAP envelope namespace
//Must use SOAP encoding namepace

 SOAP Envelope

  • Namespace: Root element of SOAP message is Envelope it defines the XML document as a   SOAP message. It should always contain the name space
  • Encoding Style Attribute: Used to define the data types used in the XML document. It has no default encoding.

SOAP Header

The Header element in SOAP contains the authentication information or information about ongoing transaction.


      <h:PServer xmlns:h=''
               soap:mustUnderstand='true' >

Each header element may be associated with a mustUnderstand attribute. We can set true or 1 value for this attribute then it considered to be mandatory. If the recipient of the message failed to recognize then it must generate a SOAP fault message.


The SOAP Body element contains the actual SOAP Message intended for the recipient. SOAP defines one element inside Body element which is SOAP Fault element used to indicate error messages.

   <m:GetPrice xmlns:m="">
The Example request the price of mobile.
The SOAP Response could looks like 
<m:GetPriceResponse xmlns:m=""> 
<m:Price>Mobile</m:Price> </m:GetPriceResponse >
SOAP Fault
This is an optional element in the SOAP message contains the error message
and status code information. It must appear as a child element of the Body element.

About the author

Kalyan Bandarupalli

My name is kalyan, I am a software architect and builds the applications using Microsoft .NET technologies. Here I am trying to share what I feel and what I think with whoever comes along wandering to Internet home of mine.I hope that this page and its contents will speak for me and that is the reason I am not going to say anything specially about my self here.

1 Comment

Leave a Reply to Cancel reply

TechBubbles Microsoft Technology BLOG

Follow me


Tag Cloud