100 likes | 259 Views
What is a web service?. A remote procedure call (RPC) over HTTP. A web-accessible operation that takes input and returns results in XML. Like a web page, but just the data with no presentation specifications. Web definitions. Importance of Web Services.
E N D
What is a web service? • A remote procedure call (RPC) over HTTP. • A web-accessible operation that takes input and returns results in XML. • Like a web page, but just the data with no presentation specifications. • Web definitions
Importance of Web Services • Larry Page, on why Google introduced its search API: “Within a few years, there will be more programs (agents) accessing Google than people accessing Google.”
Without Web Services:Content and Presentation mixed • Data can only be viewed in forms provided by Server. • Data left hidden in database. • Scrapers not robust or ethical. html Servlet Database
Web Services allow 3rd parties to display data how ever they want html html html Servlet A Servlet B Servlet C xml xml xml Service Database
Examples • Bookstores Using Amazon API • If Google Scholar had a service, could develop graph view, etc.
Web Services Allow for Aggregators html Aggregator Servlet xml xml xml xml Service D Service A Service C Service B Database A Database D Database B Database C
Competing Web Service Standards • WSDL, SOAP, UDDI • REST • XML-RPC
WSDL, SOAP, UDDI • WSDL – Web Service Description Language • SOAP – Simple Object Access Protocol • UDDI – Universal Description, Discovery, and Integration
IDE Support Writing a Service • Programmer writes class in favorite language • Programmer marks as “web service” • IDE generates wsdl file and soap service • walla! Writing a Client • Programmer provides uri of some web service • IDE generates client stub • Programmer makes calls to service methods.
XML is the plumbing Server Client Java C# Generated SOAP Generated SOAP Plumbing: programmers need not worry