Welcome to Scribd. Sign in or start your free trial to enjoy unlimited e-books, audiobooks & documents.Find out more
Download
Standard view
Full view
of .
Look up keyword
Like this
6Activity
0 of .
Results for:
No results containing your search query
P. 1
SOAP

SOAP

Ratings: (0)|Views: 200|Likes:
Published by api-3775463

More info:

Published by: api-3775463 on Oct 16, 2008
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less

03/18/2014

pdf

text

original

SOAP (Simple Object Access Protocol)

SOAP was originally developed by Microsoft, IBM, DevelopMentor and Userland Software and was
then submitted to the Internet Engineering Task Force (IETF), who eventually made it an official
recommendation. Though Microsoft camp seem to have played a major role in defining the
specification of SOAP.

The motivation of developing this protocol was the widely used inter-application communication
protocols like Microsoft\u2019s DCOM protocol or Java\u2019s RMI or OMG\u2019s IIOP protocols which have till
recent times fulfilled the needs of giving component services over an interconnected network .The
richness of these protocols helped them gain a strong hold over distributed computing over
controlled environment. Almost all these protocols need a smart client able to run the proxies of
the server components; moreover, these protocols reveal their limitations when it comes to

INTERNET. Internet cannot guarantee what kind of client and server will be operating at either
end of the connection \u2014 it can only guarantee that they are both communicating via HTTP.
SOAP (Simple Object Access Protocol) is a simple solution for interaction of different

applications built in different languages and running on different platforms as it uses HTTP as its
transport and XML as its payload for sending and receiving messages. It\u2019s a lightweight and a
loosely coupled protocol for exchange of information in a decentralized and a distributed
environment.

What\u2019s so light in SOAP?

Soap relies on HTTP as a transport mechanism to send XML based messages, the messages are
packed in what is called a SOAP envelop and send to the server to process in a Request/Response
fashion. SOAP unlike proprietary protocols like DCOM or RMI does not require strong connection
between client and the server and the SOAP messages are sting based messages passed from the
Client to Server and vice versa in the form of SOAP envelops.

What makes SOAP loosely coupled?

Most proprietary protocols require the applications of the same breed to be running on both the
ends, what if the server is implemented in a different programming language. The ability to
access service of a component in a language/location and platform transparent manner reduces
the tight coupling between the client and the server. SOAP enables \u201cincompatible\u201d systems to
interoperate.

How does SOAP Message look like and How is it different from a method invoked on a
Object?

To demonstrate how SOAP messages are different from method invocation on an component Let\u2019s
take a look at this ActiveX component, which accepts two integers and returns the total, as a
return value would look something like this,

Server ActiveX Component (MyComponent.MathComponent)
Public Function Add (Num1 as integer, Num2 as integer)
Add = Num1 + Num2
End Function
The Client would create an instance of this component and would invoke the method to get the
total.

Sub Button1_click()
Dim objAdd as new MyComponent.MathComponent
Dim intResult as integer
intResult = objAdd.Add(10,20)

end sub
This MyComponent.MathComponent would get instantiated and serve the request from the client

application.
At a higher level a SOAP request to fulfill this request would look something like this
<Add>
<Num1>100</Num1>
<Num2>400</Num2>
</Add>

In order to ensure that server can correctly identify the method call it is wrapped up in a SOAP
envelop
<SOAP:Envelop xmlns:SOAP=\u201durn:schemas-xmlsoap-org-soap.v1\u201d>
<SOAP:Header></Soap:Header>

<SOAP:Body>
<Add>
<Num1>100</Num1>
<Num2>400</Num2>
</Add>

<SOAP:Body>
</SOAP:Envelop>

This is just an abstract example to give you a gist of the SOAP message.
The real SOAP message will contain more information like the component name and stuff.
This message is sent to a SOAP listener through HTTP in a Request/Response fashion.
The SOAP Listener accepts this SOAP message and does the processing on the component and
returns the SOAP message back for the client.

In the Server you will need to implement a SOAP listener, wsdlgen.exe is a tool which comes with
the SOAP Toolkit will create a SOAP listener and a WSDL (Web Service description Language) file
for a given COM Component. For more information on WSDL visit
http://www.msdn.microsoft.com/xml/general/wsdl.asp

OH GODDDDDDDD, do I need to Marshall and UN-Marshall the XML messages myself?

The answer is NO, The Microsoft SOAP Toolkit 2 will take care of the marshaling and UN-
marshaling of the XML messages behind the scene for you.
The SOAP Toolkit also comes with a set of COM Component to access SOAP Web Services easily,
Visual Basic SOAP client
Sub Button1_click()

Dim objSOAPClient As Object
Set objSOAPClient = CreateObject("MSSOAP.SoapClient")
objSOAPClient.mssoapinit "http://ServerName/VirtualDirectory/wsdlfile.WSDL"
MsgBox objSOAPClient.Add(100,400)

End sub
That\u2019s it, the SOAP message marshaling and UN-marshaling will taken care by the SOAP client
and what you will get is the result.

SOAP and Security
SOAP as it works on HTTP get the benefits of all the security that are currently available to HTTP,
a SOAP message can pass through the firewall of the web server normally from port 80.
Limitations of SOAP

Though SOAP is evolving, and has a number of striking features, which are important in
development of, distributed applications but still there are certain things which SOAP cannot
support which I would like to address
SOAP is a simple protocol: As the name suggests it\u2019s a simple protocol and works on HTTP, we
cannot expect all the functionality\u2019s offered by other protocols like DCOM or RMI.
SOAP may turn out to be slower compared to other proprietary protocols as it requires additional
XML processing.
Still SOAP fares well in most areas compared to other wire protocol. As per the specifications,

Activity (6)

You've already reviewed this. Edit your review.
1 thousand reads
1 hundred reads
anish_10677953 liked this
vijaykumar015 liked this
venkatpelluru liked this
prosatya liked this

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->