473,748 Members | 2,426 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 5984
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
3062
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 has a defined "dtd" . I've already seen some java examples that use SOAP and AXIS to do the communication. However, we'd like to communicate from client-side javascript instead of
6
1955
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 services? It looks as though MSFT expects the client to be running Windows and ActiveX and have certain DLLs installed; and Mozilla seems to have its own implementation of SOAP. Is it possible to implement these protocols in pure client-side...
10
14093
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. So I'm wondering if I'm missing something? My test code is as follows: function myObj() { var req = new Object(); req.temp = 0;
52
5804
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
4033
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 technology is implemented on more sites now than ever. Compatibility is no longer an issue (IE, Mozilla and Opera all support it), and the benefits to using it are amazing. There are too many PHP programmers avoiding any
1
5303
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? Here's my code: The function mySaveFunction() is called by clicking the "Update" button, after the user changes the data which is populated in the form fields, which was retrieved via XMLHttpRequest from an XML external file. I know that...
3
4017
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 Webservice, which I have debug points in, which when hit I can see that all the parameters are coming thru as null. I can't figure out why this is, any experts out there would be a great help. Here is my Javascript: function showMsga()
6
2306
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 causing trouble. It chokes on this: if (window.XMLHttpRequest) nameReq = new XMLHttpRequest(); else if (window.ActiveXObject) nameReq = new ActiveXObject("Microsoft.XMLHTTP");
0
8984
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9530
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9363
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
6793
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6073
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4593
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4864
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3300
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2775
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.