spacer

Webref WebRef   Sitemap · Experts · Tools · Services · Newsletters · About i.com

home / experts / javascript / column97


Web Services, Part II: Calling Service Methods

Developer News
ActiveState Debuts Open Source Business Suite
Salesforce Offers Visual App Builder
Codesion Steps Out From CVS's Shadow

In this column we continue our series on Web services. In Part I, we introduced you to this hot topic. We explained some nomenclature related to Web services, the motivation behind them, their benefits, and tips on how to find them on the Internet. In this column, we focus on how to call Web services. We'll show you first the preparations you need to do. We'll teach you which behaviors you need to attach, and how to load the Web services you are interested in. The communication with Web services is via messages. We'll show you how to assemble messages, how to send them to the Web service, and how to analyze the returned message. We'll elaborate on the error analysis and reporting, as well as on how to print the results coming from the Web service.

You can call a Web service in two fashions. You can send it a message and then, asynchronously, wait for a response. When a response arrives, you need to verify that it corresponds to your original message. We'll teach you how to check it. The other way to call a Web service is synchronously. You don't do anyting else until you get a response from the Web service. The advantage is that you don't need to check the matching between the outgoing and the inbound messages. You are sure to get the response for your particular message.

In this column you will learn:

To try calling Web services by yourself, you must do it from your own computer. You need to download two files: example.html and webservice.htc. Put them in the same directory, and load example.html in your Internet Explorer. Both files can be loaded from the enclosed zipped file. You can see the full code listing of example.html on Page 8.

Next: How to attach the WebService behavior

More Resources from Doc JavaScript
Columns Popular Columns Tips Tools
Latest Columns
41-50 | 31-40 | 21-30
11-20 | 1-10
Working with Windows
JavaScript and Frames
Bookmarklets
Random Tips
Personalized Tips
RSS Channels
Menu Builder
Rollover Builder
Rotation Builder
Reference Tip Categories (want one?)
Links
For Your Site
Did you learn something? Do you like this site? Please link to us!

http://www.internet.com


The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers

webref The latest from WebReference.com Browse >
Use Web Caching to Make Your Web Site Faster · Creating an Online Shopping Cart Mechanism in PHP · Log JavaScript Errors Using an AJAX-driven Web Service
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Configuring Granular Settings for a Database Level Audit · The Perils of a Web 2.0 Transition on Your Business Processes · Facebook Redesigns Site —Again — Nears 400M Mark


Produced by Yehuda Shiran and Tomer Shiran
All Rights Reserved. Legal Notices.
Created: November 19, 2001
Revised: November 19, 2001

URL: http://www.webreference.com/js/column97/index.html