Web Services
How to provide remote procedure access on the web in a multi-platform
way?
- Use lowest-common denominator technology
- Transmission protocol: HTTP
- Language encoding: XML
Uses two specialized XML languages:
- WSDL - Web Services Description Language - Says what a web
service offers
- SOAP - Simple Object Access Protocol - Calls a web services and
returns results, encoding paramters, return values, etc. in XML
Show how to access Google web service
- Create new project
- Add web reference to
http://api.google.com/GoogleSearch.wsdl
- Create simple form with key, search box, go button, and results
window
- First do sync search with GoogleSearchService.doGoogleSearch
- Then do aync search with GoogleSearchService.BegindoGoogleSearch
The trick is to specify the search object as the last parameter so
it gets passed back to the callback
Ex: search.BegindoGoogleSearch(keyBox.Text, searchBox.Text, 0, 10,
true, "", false, "", "", "", new AsyncCallback(Callback), search);
Details at http://api.google.com |