Web Services, Part IV: WebService Behavior's Objects, Properties, and Events - Doc JavaScript | WebReference

Web Services, Part IV: WebService Behavior's Objects, Properties, and Events - Doc JavaScript


Web Services, Part IV: WebService Behavior's Objects, Properties, and Events

In this column we continue our series on Web services. In Part I, we introduced you to this hot topic. In Part II, we showed you how to call Web services. In Part III, we presented the WebService behavior and its four supported methods. In this column, we continue our coverage of the WebService behavior by describing its objects and properties. The WebService behavior is a critical component of the Web services revolution. It hides the mechanics and complexity of assembling and disassembling SOAP messages from the script programmer. All you need to know is how to call the WebService behavior's methods, and how to set and get its properties. These properties let you set defaults, choose between alternatives, and, most importantly, analyze the returned data packet from the remote Web service.

The WebService behavior, when assembling SOAP messages, uses a default value for almost every property that you don't care about. If you want to impact the way you call a remote Web service, you need to understand the behavior's objects, properties, and events. We'll show you how to set these properties in order to change the default set. For example, we'll explain how to make a synchronous call instead of an asynchronous call. When the message does not return successfully from the Web service, you need to provide a reasonable message to the user. There are several return codes and messages that you can parse and interpret to determine what happened. We'll show you how to utilize the behavior's objects and properties to figure this maze. We'll also show you how to use the two event handlers, onresult and onserviceavailable, to extract more information about the success or failure situation.

In this column you will learn:

Next: What are the call object's properties (1)

https://www.internet.com


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

URL: https://www.webreference.com/js/column99/index.html