dot net web services agenda web services discussion quick dot net demo assignment assignment ...

Post on 19-Dec-2015

213 Views

Category:

Documents

1 Downloads

Preview:

Click to see full reader

TRANSCRIPT

DOT NET WEB SERVICESAgenda

Web Services Discussion Quick DOT NET DEMO Assignment Lab: Hello World Service/Client Lab: Google Client Lab: Open Search Info Source

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.”

Web Services Discussion

1. Define web service2. What is the “problem” that web

services address?3. What are the emerging standards

for web services. Who supports each? What are the advantages of each?

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

Without Web Services:Content and Presentation mixed

Database

Servlet

html

• Data can only be viewed in forms provided by Server.

• Data left hidden in database.

• Scrapers not robust or ethical.

Web Services allow 3rd parties to display data how ever they want

Database

Service

Servlet A Servlet CServlet B

xmlxml

xml

html htmlhtml

Examples

Bookstores Using Amazon API

If Google Scholar had a service, could develop graph view, etc.

Web Services Allow for Aggregators

Database A

Database B Database C

Database D

Service BService A

Service C

Service D

Aggregator Servlethtml

xml

xmlxml xml

Competing Web Service Standards

XML-RPC SOAP (along with WSDL, UDDI)

Microsoft and IBM strong backers Popular in B2B More overhead Complex Data types XML spec facilitates automated service discovery Better tool support, currently.

REST Gaining Popularity Hacker/Blogger Crowd Little ovehead, String oriented (no complex data) Automated discovery???

WSDL, SOAP, UDDI

WSDL – Web Service Description Language

SOAP – Simple Object Access Protocol

UDDI – Universal Description, Discovery, and Integration

IDE Support

• Programmer writes class in favorite language

• Programmer marks as “web service”

• IDE generates wsdl file and soap service

• walla!

Writing a Service

Writing a Client

•Programmer provides uri of some web service

•IDE generates client stub

•Programmer makes calls to service methods.

XML is the plumbing

Client Server

Java C#

Generated SOAP

Generated SOAP

Plumbing: programmers need not worry

DOT NET DEMO

Service Client Display Code

See Google Client Sample:http://cs.usfca.edu/~wolber/

SoftwareDev/Distributed/WebServices/VisualStudio.Net/GoogleClientForm.aspx.cs

Sample Wrappers

A Google Open Search Web Service:http://cs.usfca.edu/~wolber/SoftwareDev/Distributed/WebServices/VisualStudio.Net/GoogleWTService.asmx.cs

A Feedster Wrapper:http://cs.usfca.edu/~wolber/SoftwareDev/Distributed/WebServices/VisualStudio.Net/Feedster.cs

Resources

Hello World Tutorial -- http://www.cs.usfca.edu/~wolber/SoftwareDev/Distributed/WebServices/VisualStudio.Net/serviceTutorial3.7.05.htmGoogle API Tutorial -- http://www.cs.usfca.edu/~wolber/SoftwareDev/Distributed/WebServices/VisualStudio.Net/googleClientTutorial3.7.05.html

O'Reilly's Visual Studio .Net Web ServicesO'Reilly's ASP.Net Web Forms

A Directory With Various Notes on Web Services: http://www.cs.usfca.edu/~wolber/SoftwareDev/Distributed/WebServices/

Want to try this in Java? I have a rough draft partial tutorial using the Apache Axis tool: http://www.cs.usfca.edu/~wolber/SoftwareDev/Distributed/WebServices/Axis%20Java%20Web%20Services/tutorial.htm

top related