473,395 Members | 1,649 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

SOAP and XMLHttpRequest

Hi all

Can anyone explain the relationship between SOAP and XMLHttpRequest in
Javascript? What actually is SOAP? and how does it relate to the
process of transferring data client-side through the aforementioned
method?

Jan 1 '07 #1
1 5956
Hi,

libsfan01 wrote:
Hi all

Can anyone explain the relationship between SOAP and XMLHttpRequest in
Javascript? What actually is SOAP? and how does it relate to the
process of transferring data client-side through the aforementioned
method?
SOAP (Simple Object Access Protocol) is, like the name shows, a
protocol. It's built on XML, which is handy in the case of a web
application, because it can be transmitted using HTTP.

The main purpose of SOAP is to allow remote procedure calls. SOAP
defines a syntax allowing to describe objects and methods. It can be
produced by a server to expose so-called "web methods". These methods
can be called by a SOAP-compliant remote client, usually in the
following way: the client calls a URL, and the server returns the
description of the methods using the SOAP protocol (this is called WSDL
file, for Web Service Description Language). Based on this WSDL file,
the client builds a proxy, which is an object reacting like the original
remote object, in the sense that it exposes the same methods. When the
client uses the proxy to call the web method, the proxy creates a
request containing the SOAP envelope with the web method call (including
parameters).

The server receives the request and uses the SOAP envelope to map the
call to the web method. The method is executed, and the return value
then encoded in SOAP again and passed back to the web client. Usually
the call is asynchronous, but most clients also support synchronous calls.

The easiest (and most hidden) way to use SOAP to make web service calls
is probably to use .NET's web references. However, SOAP is also easy to
use with Microsoft's new ASP:NET AJAX framework, which provides the
scripts needed to create proxies based on the WSDL files.

XmlHttpRequest is the interface provided by most modern web browsers to
send background HTTP requests to a web server, so it is the transport
object used when you want to make SOAP calls using JavaScript. However,
there is no strict relation between SOAP and XmlHttpRequest. You can use
SOAP without XmlHttpRequests (on some environments), and you can use
XmlHttpRequests without SOAP.

Generally speaking, using SOAP is adding quite a big overhead to a web
application, but also adds a level of comfort. Overhead because you have
to encode/decode the SOAP call every time, and to transmit quite a lot
of XML over the wire. Comfort, because it allows you to use proxies in a
very transparent way, over HTTP and the port 80, and (in the case of a
..NET server) without having to configure anything. .NET takes care of
everything for you, creates the WSDL file, encodes/decodes the SOAP
automatically, very easy.

An example of WSDL file can be seen here:
http://www.galasoft-lb.ch/mydotnet/W...ice1.asmx?WSDL

HTH,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
Jan 1 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Eric Osman | last post by:
If my question sounds ill-formed, please cut me some slack as I'm just getting started with this part of the code. We're trying to do an axis soap interface, that is, talk to a site that already...
6
by: Timo | last post by:
I don't know enough about the technology yet to know whether this is a ridiculous question-- but is there no cross-browser javascript implementation of XMLHTTP and SOAP for use in calling web...
10
by: Matt Kruse | last post by:
I'm aware of the circular reference memory leak problem with IE/closures. I'm not sure exactly how to resolve it in this situation. Also, Firefox appears to grow its memory size with the same code....
52
by: frankgerlach | last post by:
>From my simple performance tests of SOAP it seems that it is about ten times slower than binary object request protocols such as RMI, IIOP or SimpleORB. Is this also YOUR experience ?
1
by: geevaa | last post by:
http://www.phpbuilder.com/columns/kassemi20050606.php3 XMLHttpRequest and AJAX for PHP programmers James Kassemi Introduction: Although the concept isn't entirely new, XMLHttpRequest...
1
by: Tarik Monem | last post by:
OK, I'm pretty sure this cannot work because I'm trying to use JavaScript (client-side) to write to an xml file (which is server-side) using XMLHttpRequest. Can I use PHP do what I'm trying to do?...
3
by: magister pips | last post by:
Hello, I have encountered some strange behaviour when using the XMLHTTP Request object in Javascript to return xml from a C# Webservice Method. I create a SOAP envelope and send it off to the...
6
by: Patrick Nolan | last post by:
I'm working on cross-platform portability of some javascript. My Macintosh testing platform is rather old. It has Safari 1.3.2 and Internet Explorer 5.2. I got Safari working, but now IE is...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.