May 18 2007

How to make a web service call from javascript

Category: Tips and TricksJoeGeeky @ 22:10

The other day I was having a coversation with a couple of my colleague about making web service calls via JavaScript.  Within the .NET Web Service Ecosystem (e.g. ASMX web services) there are two popular technologies which are being used to facilitate this process

  • Microsoft AJAX Extensions
    • In order to make AJAX calls using this, the target Web Service must be decorated with the ‘[ScriptService]’ attribute which can be a problem if you do not own the web service.
  • JavaScript SOAP Client
    • This is an open source project that is delivered in the form of a .js file.  The good news here is that you can see how it all works and have complete control over what you put in your projects

Here are a couple of links to get started with either… 

Microsoft AJAX Extensions:
http://ajax.asp.net/docs/
(Look at the ‘Web Services’ Section)

Open Source JavaScript SOAP Client:
http://www.guru4.net/articoli/javascript-soap-client/en/

Working DEMOs
http://www.guru4.net/articoli/javascript-soap-client/demo/en.aspx

As a side note, either of these can be handy if you are developing service oriented Vista Gadgets...  Enjoy...

Tags:

Comments

1.
Andrew Pelt Andrew Pelt United Kingdom says:

Some interesting information on kitchen gear, thank you! I found loads more like this over <a href="www.kitchenappliancereviews.org">here</a>

2.
Kaiden Kaiden United States says:

Thanks for taking the time to discuss this, I feel strongly about it and love learning more on this topic. If possible, as you gain expertise, would you mind updating your blog with more information? It is extremely helpful for me.

3.
Amari Amari United States says:

Aw, this was a really quality post. In theory I'd like to write like this too - taking time and real effort to make a good article... but what can I say... I procrastinate alot and never seem to get something done.

Comments are closed