Click here to Skip to main content
13,199,852 members (69,796 online)
Click here to Skip to main content
Add your own
alternative version


77 bookmarked
Posted 5 Jun 2001

Layman's SOAP

, 7 Jun 2001
Rate this:
Please Sign up or sign in to vote.
This article gives a basic overview of SOAP.


This is a beginner level article giving basic introduction to SOAP. The purpose of this article is to introduce the SOAP concept. This article does not address 'How to Build a SOAP Server/Client'. I plan to publish a separate article on how to build a SOAP Server/Client soon.

What is SOAP?

SOAP is acronym for Simple Object Access Protocol. Simply put, SOAP = XML + HTTP. SOAP sends XML request to SOAP server over HTTP and receives the response back in XML. Since HTTP is the de facto mode of communication in Internet and all the web servers recognize and respond to HTTP request, it is an ideal protocol to use to enable integration of various systems. XML is emerging as a de facto standard to exchange information over disparate systems. SOAP's use of XML to send/receive message enables any system on any platform to read and process the message, unlike any proprietary format.

What is the need for SOAP?

Before we get into the need for SOAP, let's discuss the problem with existing technologies. Did you ever try to make your COM components distributed? I mean, if COM component resides on a different machine or network, how successful were you in using that component? Not much, uh?

Existing technologies like DCOM or CORBA can make your component distributed. However, DCOM/CORBA uses Remote Procedure Call (RPC) for communication which doesn't work well across Internet. Further, both the client and the server have to have similar or the same system and OS for DCOM/CORBA to work. You may also have to spend some time on setup, to make these solutions work.

For these reasons and more, DCOM/CORBA solutions may not be considered as supporting true distributed components. What I mean by true distributed component is, the client and server can be disparate. The client and server can have different operating systems, run on different kind of machines and network. Since SOAP uses XML over HTTP to communicate, SOAP offers true distributed component support.

Please note that SOAP is not a replacement for COM or CORBA. However, COM/CORBA can use SOAP to enable them work across the Internet.


You will encounter all of these jargons below sooner or later and I will give you a basic idea of what these jargons mean.

  • WSDL

    WSDL stands for Web Service Description Language. WSDL is an XML document that describes the operations provided by the service. For each operation, WSDL will define the schema for request and response XML string. For e.g. if you provide a web service operation that accepts Farenheit as input and returns Celsius degrees as output, part of the WSDL that describes this will look like below:

    <textarea rows=7 cols=80>
      <message name='TempConverter.FarenheitToCelcius'>
        <PART type="xsd:short" name="Farenheit" />
      <message name='TempConverter.FarenheitToCelciusResponse'>
        <PART type="xsd:short" name="Result" />
  • WSML

    Web Service Meta Language maps a web service operation to a COM component's method. For Farenheit to Celsius degrees web service, WSML will look like below:

    <textarea rows=16 cols=80>
    <?xml version='1.0' encoding='UTF-8' ?> 
     <!-- Generated 06/04/01 by Microsoft SOAP Toolkit WSDL File Generator,
          Version 1.00.623.1 --> 
    <servicemapping name='FtoC'>
      <service name='FtoC'>
        <using PROGID='FtoC.TempConverter.1' cachable='0' 
                   ID='TempConverterObject' />
        <PORT name="TempConverterSoapPort">
          <operation name='FarenheitToCelcius'>
            <execute uses='TempConverterObject' method='FarenheitToCelcius' 
    <PARAMETER name="Farenheit" elementName="Farenheit" callIndex="1" />
              <PARAMETER name="retval" elementName="Result" callIndex="-1" />

Overall process

In this section, I will give you a brief overview of the whole server side and client side process involved in making a SOAP request. The diagram below gives an overall idea of what is involved in making SOAP calls.

SOAP Overall Process

  • Client side

    • SOAP Client will initiate the process by making a SOAP request. In this process, client will refer the WSDL file which resides in the SOAP server, to form a valid SOAP request. (Steps 1 and 2 in the diagram)
    • Client will send the request to the SOAP server using HTTP.
  • Server side

    • SOAP Listener will receive the SOAP request from the client. Theoretically, Listener can be any server side CGI that can process HTTP request. However, Microsoft's SOAP Toolkit 2.0 can only support ASP and ISAPI.
    • Listener will make sure the request adheres to the schema defined in WSDL (Step 3)
    • Once the request is validated, listener will figure out appropriate method to call in the COM component with the help of WSML file.
    • COM method will be called. (Step 4)
    • The result from the COM method (Step 5) will be packaged into SOAP XML response (Step 6) in accordance with the scheme defined in WSDL.
  • Client side

    • Client will receive the SOAP response.
    • Client can unpack the SOAP response and read the result.

Note that Microsoft SOAP objects/APIs that are part of Microsoft's SOAP Toolkit will help you to do all of the above processes.


SOAP uses the common standards, XML and HTTP, to promote interoperability between heterogeneous systems anywhere on the Internet. Web services are fast emerging as a new solution paradigm and it won't be too long before you start building web services using SOAP.


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Dhandapani Ammasai(Dan in short) is a software delivery manager at a top tier IT company in India.

You may also be interested in...

Comments and Discussions

GeneralMy vote of 2 Pin
hookarm28-Oct-13 2:24
memberhookarm28-Oct-13 2:24 
Generalmod_gsoap apache error Pin
amit_tare17-Apr-10 0:41
memberamit_tare17-Apr-10 0:41 
GeneralThank Pin
jasonp122-Jan-10 16:04
memberjasonp122-Jan-10 16:04 
GeneralThanks Also Pin
AllenR31-Jul-07 21:55
memberAllenR31-Jul-07 21:55 
GeneralThanks Pin
BIG Hestia23-Jun-07 9:23
memberBIG Hestia23-Jun-07 9:23 
GeneralSOAP Client - Create Instance problem - invalid pointer Pin
leventozgur13-Sep-05 22:26
memberleventozgur13-Sep-05 22:26 


We are developing a C++ SOAP client program by using MSSOAPLib. Our development environment is Windows Xp Professional, Visual Studio .NET 2003. Our program works correctly in Xin Xp (local computer). But with Windows 2000, it fails in some computers and works correctly in some other.

Our code is below, the failure point in Win2000 computer is the part where we create the ISoapConnectorPtr object (int hr = Connector.CreateInstance(__uuidof(HttpConnector));)

The CreateInstance method returns the following log:

////////// LOG ////////////////////////////////////////////////////
2005-08-14 08:48:17 -
2005-08-14 08:48:17 - 2
2005-08-14 08:48:17 - CreateInstance Method
2005-08-14 08:48:17 - Function Return = -2147221164
2005-08-14 08:48:17 - 2.1.1
2005-08-14 08:48:17 - COM ERROR
2005-08-14 08:48:17 -
2005-08-14 08:48:17 - Invalid pointer
2005-08-14 08:48:17 - Error
2005-08-14 08:48:17 - Code = 80004003
2005-08-14 08:48:17 - Code meaning = Invalid pointer
2005-08-14 08:48:17 - Source = (null)
////////// LOG ////////////////////////////////////////////////////

So we have the invalid pointer problem (80004003). But there is no failure with WinXP computers and some other Win2000 computers. As I said above, all computers seem to have the same configuration : Microsof .NET Framework 1.1, MS SOAP Toolkit 3.0 and necessary service packs.

What can be the reason for this failure?

////////// CODE ////////////////////////////////////////////////////
#import "msxml3.dll"
using namespace MSXML2;

#import "C:\Program Files\Common Files\MSSoap\Binaries\MSSOAP1.dll" \
exclude("IStream", "ISequentialStream", "_LARGE_INTEGER", \
using namespace MSSOAPLib;

CString strRequest;


ISoapSerializerPtr Serializer = NULL;
ISoapReaderPtr Reader = NULL;
ISoapConnectorPtr Connector = NULL;

CString strFsmsWebServiceUrl = "";

printf("WEB SERVICE URL");
// Connect to the service
int hr = Connector.CreateInstance(__uuidof(HttpConnector));

printf("\nCreateInstance Method\n");
char szErrorTemp[100];

sprintf(szErrorTemp,"\tFunction Return = %d\n", hr);


Connector->Property["Timeout"] = "10000";
////////// CODE ////////////////////////////////////////////////////

Generalremote desktop app Pin
ujala zahid19-Nov-04 17:03
memberujala zahid19-Nov-04 17:03 
Generalsoap Pin
konverz27-Oct-04 23:38
memberkonverz27-Oct-04 23:38 
GeneralTyler Durden says, "Use SOAP". Pin
Cornelius4-Feb-02 10:45
memberCornelius4-Feb-02 10:45 
GeneralUsing ISAPI Listener with Soap toolkit Pin
ujjvala16-Nov-01 2:41
memberujjvala16-Nov-01 2:41 
GeneralAbout handling soap:header Pin
Anonymous23-Sep-01 23:21
memberAnonymous23-Sep-01 23:21 
QuestionGreat one...........? Pin
Mallesh17-Aug-01 5:28
memberMallesh17-Aug-01 5:28 
Generalcorrecto SOAP Document Pin
Yoshkey16-Jul-01 3:28
memberYoshkey16-Jul-01 3:28 
GeneralRe: correcto SOAP Document Pin
Yoshkey18-Jul-01 5:55
memberYoshkey18-Jul-01 5:55 
GeneralGreat article Pin
Venky Kurapati12-Jul-01 6:57
memberVenky Kurapati12-Jul-01 6:57 
QuestionWhat is available from MS? Pin
Tomaz Stih8-Jun-01 19:49
memberTomaz Stih8-Jun-01 19:49 
AnswerRe: What is available from MS? Pin
Dhandapani Ammasai8-Jun-01 20:13
memberDhandapani Ammasai8-Jun-01 20:13 
GeneralThe page is indented at the end. Pin
Giles Forster6-Jun-01 22:44
memberGiles Forster6-Jun-01 22:44 
GeneralRe: The page is indented at the end. Pin
Dhandapani Ammasai8-Jun-01 16:35
memberDhandapani Ammasai8-Jun-01 16:35 
GeneralRe: The page is indented at the end. Pin
Giles Forster8-Jun-01 22:58
memberGiles Forster8-Jun-01 22:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.171020.1 | Last Updated 8 Jun 2001
Article Copyright 2001 by Dhandapani Ammasai
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid