creating consuming web services l.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Creating & Consuming Web Services PowerPoint Presentation
Download Presentation
Creating & Consuming Web Services

Loading in 2 Seconds...

play fullscreen
1 / 18
elroy

Creating & Consuming Web Services - PowerPoint PPT Presentation

110 Views
Download Presentation
Creating & Consuming Web Services
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. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. Creating & Consuming Web Services MIS 424 Professor Sandvig

  2. Overview – Web Services • What are Web Services? • Benefits • Who is using them • Using in .NET • How to create • How to consume

  3. What are Web Services? • Web services allow applications to communicate with each other via Internet • Islands of data • Huge databases • Every large organization • Can’t communicate, share • Between organizations • Within organizations

  4. What are Web Services? • Underlying Technologies • XML • Defines data content • SOAP • Simple object access protocol • Protocol  rules • Advantage • HTTP: name-value pairs • SOAP: • data relationships • Data types • Both are W3.org standards • Supported by all major vendors

  5. Why Now? • Historically • Physical distance • Small data pipelines • Now • Internet, fiber optics, … • Distance not a problem • Recent: mid-1990’s • Limitation • Need common language & protocols • Solution • Web Services: XML & Soap

  6. Who is using? • Amazon • Retrieve shipping info • Expose product database • UPS • Shipping status, pricing information, etc. • Google • Expose database • Tap creativity of programmers • Ideas for free • Others?? • Difficult to tell, background process Overstock.com web site

  7. Using Web Services in .NET Web Service Namespaces • Implements XML & SOAP technologies • Dozens of classes • High level • Handle messy details • MSDN Documentation • Heavily promoted functionality of .NET

  8. Using Web Services • Two roles: • Create • Expose your data/application to other • Consume • Utilize web services offered by others

  9. Creating Web Services • Visual Studio: • Add new item: Web Service • .asmx file

  10. Creating Web Service Default .asmx file:

  11. Creating Web Services • Example: • Testing • Via HTTP • Request .asmx file • CreateWebService.asmx, (source .doc)

  12. Consuming Web Service • Create proxy • Visual Studio • Add service reference… • Paste in web service description language (wsdl) • VS creates classes that utilize service • Use like any other classes

  13. Consuming Web Service • Visual Studio • Paste web service URL

  14. Consuming Web Service • WSDL returns service description: • Give descriptive name and click OK

  15. Consuming Web Service • Visual Studio creates class (proxy) representing web service • Adds info to web.config

  16. Consuming Web Services • Service now represented by class • Service methods visible via Intellisense

  17. Consuming Web Service • Example: • ConsumeWebService.aspx • .asmx files can handle AJAX calls • See assignment 4 • ObjectDataSource control: • Use VS wizard to select web service class

  18. Summary – Web Services • Allow applications to communicate • Connect islands of data • Based upon W3 standards • .NET support • Very easy to publish & consume