Web Services 101 Introduction to Web Services 2110472 Computer Networks Natawut Nupairoj, Ph.D....

25
Web Services 101 Introduction to Web Services 2110472 Computer Networks Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University

Transcript of Web Services 101 Introduction to Web Services 2110472 Computer Networks Natawut Nupairoj, Ph.D....

Page 1: Web Services 101 Introduction to Web Services 2110472 Computer Networks Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University.

Web Services 101Introduction to Web

Services

2110472 Computer Networks

Natawut Nupairoj, Ph.D.

Department of Computer Engineering

Chulalongkorn University

Page 2: Web Services 101 Introduction to Web Services 2110472 Computer Networks Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University.

Outline

What is web service ? Any why ? Service-Oriented Architecture. Web Services Products. Existed and Future Applications. Trends and Future.

Page 3: Web Services 101 Introduction to Web Services 2110472 Computer Networks Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University.

What is web service ?

“Next-generation service-oriented Internet applications.”

“Component-based software architecture.”

“A concept of a programmable Internet.”

Page 4: Web Services 101 Introduction to Web Services 2110472 Computer Networks Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University.

OK, what really is web service ?

Well…nobody really knows for sure. Everyone has its own definition. Something in common

Software components with well-defined interfaces.

Communicating through XML-based messaging. Connecting via HTTP-based protocol.

Page 5: Web Services 101 Introduction to Web Services 2110472 Computer Networks Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University.

Why then ?

Everybody is doing it !!!

Page 6: Web Services 101 Introduction to Web Services 2110472 Computer Networks Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University.
Page 7: Web Services 101 Introduction to Web Services 2110472 Computer Networks Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University.

No…that’s not a good answer!!!

Page 8: Web Services 101 Introduction to Web Services 2110472 Computer Networks Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University.

Web Services Model

Page 9: Web Services 101 Introduction to Web Services 2110472 Computer Networks Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University.

Driving Forces

E-business trends Flexible architecture. From RPC to messaging-centric model.

Business needs EAI – Enterprise Application Integration. B2B / G2G.

Page 10: Web Services 101 Introduction to Web Services 2110472 Computer Networks Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University.

The Ultimate Goals

Web service is Platform independent. Implementation independent. Software Components.

Features Described using a service description language. Published to a registry of services. Discovered through a standard mechanism. Invoked through a declared API over a network. Composed with other services.

Page 11: Web Services 101 Introduction to Web Services 2110472 Computer Networks Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University.

Service Oriented Architecture

Publish – Find – Bind.

ServiceRegistry

ServiceProvider

ServiceRequestor

Publish

Bind

Find

UDDI

SOAP

WSDL

Page 12: Web Services 101 Introduction to Web Services 2110472 Computer Networks Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University.

Web Services Interoperability Stacks

Proposed to W3C by IBM and Microsoft in March 2001 Wire stack. Description stack. Discovery stack.

Page 13: Web Services 101 Introduction to Web Services 2110472 Computer Networks Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University.

Wire Stack

Determine how a message is sent from the service requestor to the service provider.

Components HTTP (SMTP, FTP, RMI/IIOP, MQSeries). XML. SOAP.

“XML-based RPC over HTTP”

Page 14: Web Services 101 Introduction to Web Services 2110472 Computer Networks Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University.

SOAP RPC Request

POST /bws/inventory.jws HTTP/1.0…

<?xml version=“1.0” encoding=“UTF-8”?><SOAP-ENV:Envelope

SOAP-ENV:encodingStyle=http://schemas.xmlsoap.org/soap/encoding/xmlns:xsd=http://www.w3.org/2001/XMLSchemaxmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance><SOAP-ENV:Body>

<doCheck><arg0 xsi:type=“xsd:string”>947-TI</arg0><arg1 xsi:type=“xsd:int”>1</arg1>

</doCheck></SOAP-ENV:Body>

</SOAP-ENV:Envelope>

Page 15: Web Services 101 Introduction to Web Services 2110472 Computer Networks Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University.

SOAP RPC Response

HTTP/1.0 200 OK

<?xml version=“1.0” encoding=“UTF-8”?>

<SOAP-ENV:Envelope

SOAP-ENV:encodingStyle=http://schemas.xmlsoap.org/soap/encoding/

xmlns:xsd=http://www.w3.org/2001/XMLSchema

xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/

xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance>

<SOAP-ENV:Body>

<doCheckResponse>

<doCheckResult xsi:type=“xsd:boolean”>true</doCheckResult>

</doCheckResponse>

</SOAP-ENV:Body>

</SOAP-ENV:Envelope>

Page 16: Web Services 101 Introduction to Web Services 2110472 Computer Networks Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University.

SOAP Messaging

<?xml version=“1.0” encoding=“UTF-8”?><SOAP-ENV:Envelope

SOAP-ENV:encodingStyle=http://schemas.xmlsoap.org/soap/encoding/xmlns:xsd=http://www.w3.org/2001/XMLSchemaxmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance><SOAP-ENV:Body>

<po xmlns=http://www.skatestown.com/ns/poid=“503383” submitted=“2001-12-06”><billTo>

<company>The Skateboard Warehouse</company><street>One Warehouse Park</street>…

</billTo>…

</po></SOAP-ENV:Body>

</SOAP-ENV:Envelope>

Page 17: Web Services 101 Introduction to Web Services 2110472 Computer Networks Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University.

Description Stack

Describe the details of the service What a service does (provided methods). How a service is accessed (data format &

protocol). Where a service is located (e.g. URL).

WSDL / WSEL XML-based format. Service implementation and interface. Endpoint description.UDDI.

Page 18: Web Services 101 Introduction to Web Services 2110472 Computer Networks Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University.

Discovery Stack

Provide service discovery mechanism. There are 2 levels

Inspection – discovering the service description given that service identifier (URL) is known. IBM’s ADS and Microsoft’s DISCO.

Directory – capabilities-based lookup. UDDI.

Page 19: Web Services 101 Introduction to Web Services 2110472 Computer Networks Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University.

What are in the market ?

J2EE BEA – WebLogic Server. IBM – WebSphere SOAP toolkit. Sun – SunOne. Iona – XMLBus Macromadia – JRun 3.1 / JRun 4.0. Apache – Axis (SOAP API). University of Indiana – SOAP-RMI. Mind Electric – GLUE.

Microsoft’s .NET

Page 20: Web Services 101 Introduction to Web Services 2110472 Computer Networks Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University.

Any existing applications ?

Yes…there are some… Dealersphere

National Auto Dealer Association. Car dealers to communicate with other

companies via ebXML and SOAP. Features?

Handling credit checks. Getting the exact color and car options. Locating the car at another dealer.

Page 21: Web Services 101 Introduction to Web Services 2110472 Computer Networks Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University.

Any existing applications ?

Public eService Infrastructure (PSi) iDA Singapore. Integrate over 600 online services from several

government agencies. Ex:

Request for a new driver’s license. Service provided by Land Transport Authority of Singapore. However, citizen information is needed from Citizen

Department. And payment must be made online. Other services also need these information.

Page 22: Web Services 101 Introduction to Web Services 2110472 Computer Networks Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University.

Future applications ?

Authentication services Microsoft’s Passport. Liberty Alliance.

Agent-based shopping. Internet syndication.

Page 23: Web Services 101 Introduction to Web Services 2110472 Computer Networks Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University.

Conclusion

Web services is still unclear Open areas. Or just a hype!

Publish + find + bind = WSDL + UDDI + Soap

Page 24: Web Services 101 Introduction to Web Services 2110472 Computer Networks Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University.

References

S. Graham et. al, “Building Web Services with Java”, SAMS Publishing, 2002.

http://www.webservices.org And others…

Page 25: Web Services 101 Introduction to Web Services 2110472 Computer Networks Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University.

Questions ?