Web Services, Part II: Calling Service Methods: A Final Word - Doc JavaScript
Web Services, Part II: Calling Service Methods
A Final Word
In this column, we continued our series on Web services. We focused here on how to call Web services. We showed you a live example on the first page. We provided you with two buttons to call the Echo Web service, both synchronously and asynchronously. We taught you how to attach the WebService
behavior, and how to load the requested Web service's URL. We showed you how to assemble a message and send it to the Web service. We described the various error messages that you can check after the response arrives. We proposed different formats to print the error message, such as a string and a raw SOAP packet. We explained how to print the result value, when errors are not found. Finally, we went into great detail on how to define the synchronous button so it can be enabled only when the Web service is ready.
In this column you have learned:
- How to attach the WebService behavior
- How to load a Web service URL
- How to send a message to a Web service
- How to handle the response through the
result
object - How to handle the response through the
event.result
object - How to define the calling buttons
You could see the full code listing of the buttons (and the JavaScript code) on Page 8. Load it from the enclosed zipped file.
Produced by Yehuda Shiran and Tomer Shiran
All Rights Reserved. Legal Notices.
Created: November 19, 2001
Revised: November 19, 2001
URL: https://www.webreference.com/js/column97/9.html