|
November 18, 2001 Checking the result Object Tips: November 2001
Yehuda Shiran, Ph.D.
|
|
When you call a Web service, you actually send a message to the service and then receive another message as a response. You send a message via the callService() method. Here is an example for calling a Web service in Internet Explorer:
The response message, or errors encountered during the interaction with the Web service, are attached to an object, called the result object. If you want to find the result of your query to the Web service, you need to analyze the result object. First, you need to know where you can get it for analysis. Well, it depends on how you call the Web service. If you specify an event handler in the callService() method (first parameter), the result object will be passed as a parameter to this event handler. Here is the handleResult() function from the above callService() example:
If you don't specify an event handler in the callService() method, you can get the result object as a property of the event object. You first specify the onresult event handler like here:
And you define the onWSresult() as follows:
People who read this tip also read these tips: Look for similar tips by subject: |