web services 101 introduction to web services 2110472 computer networks natawut nupairoj, ph.d....
Post on 27-Dec-2015
215 Views
Preview:
TRANSCRIPT
Web Services 101Introduction 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.
What is web service ?
“Next-generation service-oriented Internet applications.”
“Component-based software architecture.”
“A concept of a programmable Internet.”
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.
Why then ?
Everybody is doing it !!!
No…that’s not a good answer!!!
Web Services Model
Driving Forces
E-business trends Flexible architecture. From RPC to messaging-centric model.
Business needs EAI – Enterprise Application Integration. B2B / G2G.
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.
Service Oriented Architecture
Publish – Find – Bind.
ServiceRegistry
ServiceProvider
ServiceRequestor
Publish
Bind
Find
UDDI
SOAP
WSDL
Web Services Interoperability Stacks
Proposed to W3C by IBM and Microsoft in March 2001 Wire stack. Description stack. Discovery stack.
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”
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>
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>
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>
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.
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.
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
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.
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.
Future applications ?
Authentication services Microsoft’s Passport. Liberty Alliance.
Agent-based shopping. Internet syndication.
Conclusion
Web services is still unclear Open areas. Or just a hype!
Publish + find + bind = WSDL + UDDI + Soap
References
S. Graham et. al, “Building Web Services with Java”, SAMS Publishing, 2002.
http://www.webservices.org And others…
Questions ?
top related