DOC PREVIEW
Yale CPSC 155 - Web Services

This preview shows page 1-2-3-21-22-23-42-43-44 out of 44 pages.

Save
View full document
Premium Document
Do you want full access? Go Premium and unlock all 44 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Web Services Brian A LaMacchia Microsoft Five Questions What is a Web Service Why are Web Services interesting Why should I care about them What e commerce business models do Web Services enable What security and privacy issues need to be addressed for Web Services to be successful What the heck is Microsoft s NET Platform all about and how does NET relate to Web Services What is a Web Service Software Design Principles Abstraction Componentization In your own programs Reusable software components Current web usage User oriented browsing User oriented data publication Software Design Principles Abstraction Procedural abstraction public static int Square int x return x x int y Square 3 y is 9 We abstract reuse useful functions all the time in programs Abstraction hides implementation details Abstraction Hides Details public static float GetQuote String symbol implementation goes here details are hidden from caller public static void Main String args float msftPrice GetQuote MSFT Console WriteLine MSFT 0 F2 msftPrice C test exe MSFT 61 40 Only need to worry about inputs to outputs from a method or function Componentization We share code among programs by creating software components Ex Software libraries that you link against when you compile programs or that you reference dynamically usr pkg bin perl use Finance YahooQuote symbols msft intc dell hwp cpth q getquote symbols foreach a q print a 0 a 2 a 5 n Software Components Reusable components are valuable You can sell components Save time Coding Debugging Save testing effort Share knowledge Markets exist for software libraries You can given them away to sell something else Ex Device drivers Components are local Local code execution Execute on your machine Code source or object must live on your local machine Maybe do just in time download install Not so great if the data is remote Ex Stock analysis component Wants as much historical data as possible Is everyone going to cache the last 100 years of the NYSE on their hard disks Ex complex searches against the NYT archives Want code to run on the server Saved by the Web Web Usage Today Web usage today is browser oriented Users browse for information Vast databases are accessed through HTML gateways user friendly displays Example Yahoo s stock ticker Yahoo has tons of stock price history sitting behind http quote yahoo com That info is easily available to anyone who browses to the right page But look at how the info is presented Yahoo s Stock Ticker Screen scraping Data is formatted for easy use by people not programs Programs need to mimic users to Scrape the screen Parse make use of the data Call server side functions plot a chart compute something perform a search etc Download the HTML and then pattern match against it Inefficient and fragile Data type semantics are lost We need a better mechanism for making Web published data and component software functions available to programs What is a Web Service Software components application logic accessible via standard Web protocols Available to any client that speaks the necessary Web protocols XML SOAP Programming the Web Better remote procedure calls over the Web Web sites with no user interface Platform independent components Enable highly distributed systems Finding talking to Web Services Clients need answers to three separate questions What services are available How do I communicate with this particular service Let s talk Give me some data Three Standards UDDI Universal Description Discovery and Integration WSDL Web Service Description Language Document describing the message exchange contract SOAP Simple Object Access Protocol Yellow pages directory for services XML based protocol for messaging All based on XML the foundation Web Services In Practice Find a Service http www uddi org UDDI Link to WSDL document Web Service Consumer How do we talk WSDL http yourservice com WSDL XML with service descriptions Web Service Let me talk to you SOAP http yourservice com svc1 XML SOAP BODY Design Time or Dynamic Runtime Why are Web Services interesting For Developers Access to a Web wide library of software components Smart development tools can Help you locate useful Web Services Download service descriptions WSDL Automatically generate code from the WSDL to talk to the service using SOAP over HTTP On the server side automatically generate WSDL for a service from its source code WSDL for a Quote Service xml version 1 0 encoding utfencoding utf 8 definitions xmlns soap http schemas xmlsoap org wsdl soap xmlns soap http schemas xmlsoap org wsdl soap xmlns tns http www themindelectric com wsdl net xmethods services stockquote StockQuote uote StockQuote xmlns s http www w3 org 2001 XMLSchema xmlns tns http www themindelectric com wsdl net xmethods services stockq xmlns s http www w3 org 2001 XMLSchema xmlns http http schemas xmlsoap org wsdl http xmlns tm http microsoft com wsdl mime textMatching xmlns http http schemas xmlsoap org wsdl http xmlns tm http microsoft com wsdl mime textMatching xmlns mime http schemas xmlsoap org wsdl mime xmlns soapenc http schemas xmlsoap org soap encoding soap encoding xmlns mime http schemas xmlsoap org wsdl mime xmlns soapenc http schemas xmlsoap org targetNamespace http www themindelectric com wsdl net xmethods services stockquote StockQuote uote StockQuote targetNamespace http www themindelectric com wsdl net xmethods services stockq name net xmethods services stockquote StockQuote xmlns http schemas xmlsoap org wsdl name net xmethods services stockquote StockQuote xmlns http schemas xmlsoap org wsdl types message name getQuoteResponse1 part name Result type s float type s float message message name getQuoteRequest1 part name symbol type s string type s string message portType name net xmethods services stockquote StockQuotePortType name net xmethods services stockquote StockQuotePortType operation name getQuote parameterOrder symbol name getQuote parameterOrder symbol input message tns getQuoteRequest1 message tns getQuoteRequest1 output message tns getQuoteResponse1 message tns getQuoteResponse1 operation portType portType binding name net xmethods services stockquote StockQuoteBinding type tns net xmethods services stockquote StockQuotePortType name net xmethods services stockquote StockQuoteBinding type tns net xmethods services stockquote StockQuotePortType soap binding transport http schemas xmlsoap org soap http style rpc transport http schemas xmlsoap org soap http style rpc operation name


View Full Document

Yale CPSC 155 - Web Services

Documents in this Course
Portals

Portals

16 pages

Lecture 4

Lecture 4

30 pages

Lecture 2

Lecture 2

20 pages

Lecture 2

Lecture 2

19 pages

Lecture 9

Lecture 9

25 pages

Lecture 7

Lecture 7

23 pages

Load more
Download Web Services
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Web Services and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Web Services and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?