1 / 23

Computer Science 101

Computer Science 101. Web Services. Alsos Search for Niels Bohr. AtomicArchive.Com Article on Niels Bohr. AtomicArchive.Com Article on Niels Bohr (cont.). Produces Alsos Search. Alsos Search for Niels Bohr. A specific reference. That’s what they get, not what they want!.

thuy
Download Presentation

Computer Science 101

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Computer Science 101 Web Services

  2. Alsos Search for Niels Bohr

  3. AtomicArchive.Com Article on Niels Bohr

  4. AtomicArchive.Com Article on Niels Bohr (cont.) Produces Alsos Search

  5. Alsos Search for Niels Bohr

  6. A specific reference

  7. That’s what they get, not what they want! • We are providing them with a mechanism, “dynamic links”, that enable them to do “live” searches into Alsos – not just link to the Alsos home page, but … • The user ends up in Alsos site, not Atomic Archives. • They would like a way to get data (annotations) from Alsos that they could format within their pages.

  8. What if we wanted to provide this: • Suppose we wanted to provide a mechanism for developers to get data from us for use on their web pages. • We would not want them to access our database with SQL statements • Might change database • Want control of the kind of data we let them have • Would not want to restrict to platform, .NET, Linux, etc.

  9. What if we wanted to provide this:(cont.) • We would need a platform independent means of sharing data • That’s exactly what XML is all about – it’s text based, marked up data. • Web service – software component that you call over the web. • Accepts and returns XML data

  10. The Big Picture • Just like HTML provides a standard way for marking up text for web page display, XML provides a standard way for marking up data. • Web services then provide a standard way for programs to pass this data back and forth to each other.

  11. Example – Google Service

  12. Search Button private void btnSearch_Click (Object sender, System.EventArgs e) { GoogleSearchResult result = null; GoogleSearchService google; ResultElement re; google = new GoogleSearchService(); this.lstURLs.get_Items().Clear(); for (int i = 0; i < 20; i += 10) // get first 20 hits total { result = google.doGoogleSearch("4a8/TvZQFHID0WIWnL1CMmMx0sNqhG8H", this.txtSearch.get_Text(), i, 10, false, "", false, "", "", ""); for (int j = 0; j< result.resultElements.length; j++) { re = result.resultElements[j]; this.lstURLs.get_Items().Add(re.URL); } this.lstURLs.Refresh(); }//for-n-hits this.lblHits.set_Text( String.valueOf(result.estimatedTotalResultsCount) ); MessageBox.Show("Search complete, first 20 hits are shown!"); }

  13. Item Selected private void lstURLs_SelectedIndexChanged (Object sender, System.EventArgs e) { java.lang.Object a, b, c, d; a = b = c = d = null; // optional parameters // navigate to selected site! this.axWebBrowser1.Navigate(this.lstURLs.get_Text(), a, b, c, d); }

  14. Terra Service

  15. Stock Ticker

  16. Movie Theaters

  17. Xmethods.net

  18. Movie Service

  19. Movie Service Description

  20. Movie – Code for Find Button

  21. Movie – Code for Theater Selection

  22. Industry Scenario • Suppose we have a huge industrial manufacturing company. • The parts we need are supplied by a number of different suppliers. • At a given time we may prefer one supplier over the others based on • Current price they offer • Adequacy of their inventory relative to our needs.

  23. Industry Scenario (cont.) • Assuming that all of these suppliers provide web services for our use, our decision and purchase could be automated: • Our inventory/purchasing program could communicate our needs to all of the supplier web services and receive their price and inventory information • Based on these results, our program could choose the lowest price among suppliers with acceptable inventories.

More Related