Professional Documents
Culture Documents
Samir Tata
Outline
Service Orientation Web Service Web Service framework SOAP WSDL UDDI
Samir Tata
Service orientation
Samir Tata
Structured Programming
A very good thing
Service-orientation
Promise: Organization and Reuse Procedures, Functions and Data Got computing out of the stone-age
Object-Orientation
A very good thing
Service-orientation
Promise: Organization and Reuse Classes (Functions and Data grouped) Made developers productive
Component-Orientation
A very good thing
Service-orientation
Promise: Organization and Reuse Components (Interfaces grouped) Implementation agnostic Made cross-app interaction work
Great!
Multi-Layer, Multi-Tier Applications High-Perf, High-Scale Servers
Samir Tata 6
Needs
There's little "green field" anymore
New stuff needs existing stuff Existing stuff needs new stuff
Service-orientation
Heterogeneous Systems
No single OS-family / HW-platform
Wants
Reuse and organization
Service-orientation
Implementation agnostic
Standards-based interaction Don't depend on language/platform
Samir Tata
Service-Orientation
What is a "Service" ?
Some functional block
Location, Platform, Code are irrelevant
Service-orientation
Implications
Always assume remote use Always assume cross-platform use Ignore service's inner implementation
Samir Tata
10
Samir Tata
11
Assumptions to Avoid
Don't think of a service as
Service-orientation
Transactions, Objects, Functions Synchronous or Asynchronous Stateless or Stateful The actual invocation target
Services may be
Message destinations (applications) Message handlers (infrastructure) Message carriers (transport)
Samir Tata 12
Terminology
Message
Service-orientation
Context
Defines scope of action, conversation Clothes-line for state and infrastructure
Destinations
Target service or service class. Not "http://somewhere/"
Samir Tata 13
So what is a service?
Service-orientation
There really are just three types of services Message Producer type
Act and add stuff to messages
Samir Tata
14
Examples
Service-orientation
Web Service
Samir Tata
16
Todays Web
Web service
Web designed for application to human interactions Served very well its purpose:
Samir Tata
Information sharing: a distributed content library. Enabled B2C e-commerce. Non-automated B2B interactions. Built on very few standards: http + html Shallow interaction model: very few assumptions made about computing platforms. Result was ubiquity.
17
Whats next?
Web service
Goal:
A Web service is a software application identified by a URI, whose interfaces and binding(1) are capable of being defined, described and discovered by XML artefacts and supports direct interactions with other software applications using XML based messages via Internet-based protocols. (W3C definition)
(1) An association between an Interface, a concrete protocol and a data format
Samir Tata
19
WS Benefits
Web service
Internet-wide standards Platform/Language independent Growing number of tools Ease of use (compared with CORBA) Support for legacy systems (wrap) Applies to loosely coupled architectures
Samir Tata 20
Samir Tata
21
Samir Tata
22
Exposes capabilities
Context, Transactions,
May be a service Aggregation Doesn't worry about implementation Only worries about contracts
Messages Requested QoS Required Capabilities
Samir Tata 25
Framework can be described in terms of What goes on the wire ? Formats and protocols: SOAP. What describes what goes on the wire ? Description languages: WSDL. What allows us to find these descriptions ? Discovery of services: UDDI. What allows us to build efficient applications ? Composition of services: WSFL, BPML, BPEL4WS, XLANG, etc.
Samir Tata
26
Universal Description, Discovery and Integration (UDDI) serves as a business and service registry essential for the widespread use of Web services WSFL, XLANG, BPEL4WS, DAML-S are some of the XML languages that have been proposed for specifying a Web service composition
Samir Tata
27
SOAP
Simple Object Access Protocol
Samir Tata
28
Presentation Overview
What is SOAP? Components of SOAP
SOAP Envelope SOAP Encoding Rules SOAP RPC Representation
Samir Tata
The SOAP Message Exchange Model Examples of SOAP Messages SOAP Security Limitations of SOAP Implications and Conclusions
29
What is SOAP?
SOAP
stands for Simple Object Access Protocol is a communication protocol specification for invoking methods on servers, services, components, and objects. combines HTTP with XML. is designed to communicate via Internet is platform independent. is language independent. can be used in a large variety of systems ranging from messaging systems to RPC. is simple and extensible. is a format for sending messages
Samir Tata
30
Why SOAP?
Important for application development to allow Internet communication. RPC calls are not easily adaptable to the Internet. Current RPC methods represent a security problem. SOAP is platform independent. SOAP is language independent. SOAP can be used in a large variety of systems ranging from messaging systems to RPC. SOAP is simple and extensible. SOAP is a format for sending messages.
Samir Tata
31
Components of SOAP
SOAP consists of three parts:
The SOAP Envelope
is a construct that defines an overall framework for expressing what is in a message, who should deal with it, and whether it is optional or mandatory.
Samir Tata
33
Encoding
Object type + values + XML schema XML instance XML instance + XML schema Object type + values
Samir Tata
34
SOAP implementations can be optimized to exploit the unique characteristics of particular network systems (protocols).
i.e. SOAP response messages to be delivered as HTTP responses when using HTTP binding.
Messages are routed along a message path which allows for processing at one or more intermediate nodes in addition to the ultimate destination.
Samir Tata 36
Message Processing
A SOAP application receiving a SOAP message must process the message as follows: Identify all parts of the SOAP message intended for that application. Verify that all mandatory parts identified in step 1 are supported by the application for this message and process them accordingly. If the SOAP application is not the ultimate destination of the message then remove all parts identified in step 1 before forwarding the message.
Samir Tata 37
Samir Tata
38
soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
Samir Tata
41
Implementations of SOAP
Axis Apache Web Services Toolkit (IBM) JAXM (Sun) ZOAP (jBoss.org) HP Web Services Platform Microsoft SOAP toolkit (VB, etc.) .NET Framework (Microsoft) Many others
Samir Tata
42
Conclusion
SOAP does not mandate an API of any kind. attempt to address the more complex distributed object protocol services such as object activation, marshaling objects/references, garbage collection, or bidirectional communications. prevent using any of the above services but they are simple implementation details that can be layered on top of the SOAP protocol (taking TIME). SOAP is inherently SIMPLE! simply defines how to access services, objects, and servers in a platform-independent manner using HTTP and XML. away allowing an increased level of interoperability. promoting further progress towards developers working together.
Samir Tata 43
References
http://www.develop.com/soap/soapfaq.htm http://msdn.microsoft.com/library/default.asp?url=/libr ary/en-us/dnsoapspec/html/soapspecindex.asp http://msdn.microsoft.com/library/default.asp?url=/libr ary/en-us/dnmag00/html/soap0300.asp http://www.w3.org/TR/SOAP/ http://www.microsoft.com/mind/0100/soap/soap.asp http://schemas.xmlsoap.org/soap/envelope http://schemas.xmlsoap.org/soap/encoding http://msdn.microsoft.com/library/default.asp?url=/libr ary/en-us/dnwebsrv/html/xmloverchap2.asp http://www.mybubble.com:8080/mybubbleEntServer/M yBubbleSoapServices.wsdl http://www.w3schools.com/soap/soap_intro.asp
Samir Tata
44
WSDL
Web Service Description Language
Samir Tata
45
[ref]
Binding WSDL
Binding WSDL
HTTP/SOAP Request Port WSDL n1 HTTP/SOAP Response HTTP/SOAP Request HTTP/SOAP Response Port WSDL n2 Web services 2 Web services 1
Server
Samir Tata
46
Introduction
What is WSDL ?
stands for Web Service Description Language is an XML document for describing web services represents the behavior of a resource on the Web
Samir Tata
47
Endpoint Defintion
Bindings Protocol html , smtp Encoding Service
Samir Tata 48
Samir Tata
49
Samir Tata
51
Samir Tata
52
Samir Tata
53
Samir Tata
54
Samir Tata
55
<types> <schema targetNamespace="http://stockquote.com/stockquote.xsd" xmlns="http://www.w3.org/2000/10/XMLSchema"> <element name="SubscribeToQuotes"> <complexType><all><element name="tickerSymbol" type="string"/></all></complexType></element> <element name="SubscriptionHeader" type="uriReference"/> </schema> </types> <message name="SubscribeToQuotes"> <part name="body" element="xsd1:SubscribeToQuotes"/> <part name="subscribeheader" element="xsd1:SubscriptionHeader"/> </message> <portType name="StockQuotePortType"> <operation name="SubscribeToQuotes"> <input message="tns:SubscribeToQuotes"/> </operation> </portType>
Samir Tata
56
Samir Tata
57
Samir Tata
58
Using WSDL
As extended IDL: WSDL allows tools to generate compatible client and server stubs.
Tool support for top-down, bottom-up and meet in the middle development.
Allows industries to define standardized service interfaces. Allows advertisement of service descriptions, enables dynamic discovery and binding of compatible services.
Used in conjunction with UDDI registry
Samir Tata
59
Samir Tata
60
Samir Tata
61
Example (2)
String endpoint="http://nagoya.apache.org:5049/axis/services/echo"; Service service = new Service(); Call call = (Call) service.createCall(); call.setTargetEndpointAddress( new java.net.URL(endpoint) ); call.setOperationName(newQName("http://soapinterop.org/","echoString")); Call to addParameter/setReturnType as described in user-guide.html call.addParameter("testParam",org.apache.axis.Constants.XSD_STRING, javax.xml.rpc.ParameterMode.IN); call.setReturnType(org.apache.axis.Constants.XSD_STRING); String ret = (String) call.invoke( new Object[] { "Hello!" } ); System.out.println("Sent 'Hello!', got '" + ret + "'");
Samir Tata
63
UDDI
Universal Description, Discovery and Integration
Samir Tata
64
Needs
Need to make services available Which services are available? Classes, Taxonomies, Locality Regional, legal, trust boundaries Need to find services Static and dynamic Need to negotiate capabilities Security, Context, Transactions, Reliable Messaging Need to find ways to connect
Samir Tata
65
UDDI roles
UDDI plays three roles :White pages,Yellow pages, Green pages
White pages address, contact, and known identifiers Green pages Namespace to describe how to use the service, etc... Identifier of who published the service Unique identifier (tModelKey) of this service for registration Yellow pages industrial categorisations Industry Product/Services Location
Business Entity (Provider): Information about the entity who offers a service BusinessService: Descriptive information about a particular family of technical offerings
0n
0n
BindingTemplate: Technical information about a service entry point and construction specs
Bindings contain references to tModels. These references designate the interface specifications for a service.
Samir Tata
67
Services
Examples: Purchase Order services, Payroll services Name, Description(s) Categorization Information
Bindings
Description(s), access points, parameters Examples: Access Point (http://...) for Web Service
Samir Tata
68
UDDI
Implantation <import> <service> <port> <port> UDDI BusinessEntity BusinessService BusinessTemplate BusinessTemplate
tModel
69
Implantation
<wsdl:definitions name="NormAdresseService" targetNamespace="http://"> <import namespace="http://" location="http://" /> <wsdl:service name="DoNormeService"> <wsdl:port name="NormAdresseService " binding="intf:NormAdresseServiceSoapBinding"> </wsdl:service> </wsdl:definitions>
UDDI
UDDI
<BusinessEntity businessKey=""
Interface
<wsdl:definitions name="NormAdresseService.interface" targetNamespace="http://"> <wsdl:message name="getNormeResponse"> </wsdl:message> <wsdl:portType name="DoNorme"> </wsdl:portType> <wsdl:binding name="NormAdresseServiceSoapBinding" type="intf:DoNorme"> </wsdl:binding> </wsdl:definitions> </wsdl:definitions>
<name> Normalisation d'adresse </name> <businessService serviceKey=""> <name> DoNormeService </name> <BindingTemplates bindingKey=""> <TmodelInstanceInfo tModelKey=""> <overviewDoc> <overviewdocURL>http://# NormAdresseService </overviewdocURL> </BindingTemplates> </businessService> </BusinessEntity>
Samir Tata
<tModel tModelKey="" <name> http:// </name> <overviewDoc> <overviewdocURL>http://#NormAdresseServiceSo apBinding targetNamespace="http://"> </overviewdocURL> <categoryBag> <KeyedReference tModemKey="" keyname="uddiorg:types keyvalue="wsdlSpec"/> </ categoryBag > </tModel>
70
Technical Users
71
Samir Tata
72
Samir Tata
73
WSDL WebService
Samir Tata
74
Samir Tata
75
UDDI4J
Inquiry API Find
find_business find_service find_binding find_tModel get_businessDetail get_serviceDetail get_bindingDetail get_tModelDetail
Find details
Delete
Security
get_authToken discard_authToken
Samir Tata
76
Samir Tata
77
Samir Tata
78
Samir Tata
80
Samir Tata
81
References
Herzum, Peter, Tutorial #20: Web Services and Service Oriented Architectures, OOPSLA 2002, Seattle, WA. Booch, G., Object oriented design with applications, Benjamin-Cummings Publishing Co., Inc., Redwood City, CA, 1990 . Kreger, Heather., Web Services Conceptual Architecture (WSCA 1.0), IBM, May 2001, http://www3.ibm.com/software/solutions/webservices/pdf/WSCA.pdf. Mani, A. and Nagarajan A., Understanding quality of service for Web Services, IBM DeveloperWorks, January 2002, http://www-106.ibm.com/developerworks/webservices/library/wsquality.html?dwzone=webservices, current October 2002. Parnas, D., On the criteria to be used in decomposing systems into modules. Communications of the ACM, 15(12):1053-1058, December 1972. Reprint: http://www.acm.org/classics/may96/ Yourdon, E. and Constantine, L., Structured Design, Englewood Cliffs, N.J.: Prentice-Hall, 1975. Stevens, M., The Benefits of a Service-Oriented Architecture, Developer.com, http://softwaredev.earthweb.com/msnet/article/0,,10839_1041191,00.html, current October 2002. Szyperski C., Component Software - Beyond Object Oriented Programming, Addison-Wesley, 1998. Tarak, M., WSIL: Do we need another Web Services Specification?, Web Services Architect, January 2002, http://www.webservicesarchitect.com/content/articles/modi01.asp, current October 2002. W3C, W3C Process Document: 5 Technical Reports, http://www.w3.org/Consortium/Process20010719/tr.html, current October 2002.
Samir Tata
82
References
Bass, Clements, and Kazman, Software Architecture in Practice, Addison-Wesley 1997. Bieber, G., Carpenter, J., Introduction to Service-Oriented Programming (Rev 2.1), http://www.openwings.org/download/specs/ServiceOrientedIntroduction.pdf, current October 2002. Fowler, M., UML Distiled: Applying the Standard Object Modeling Language, Addison-Wesley, 1997. Gamma E., Helm R., Johnson R., Vlissides, J., Design Patterns: Elements of Reusable ObjectOriented Software, Addison-Wesley, 1994. Garlan, D., Software Architecture: a Roadmap, ACM Press, 2000. Herzum, P., Web Services and Service-Oriented Architectures, Executive Report, Vol 4, No. 10, Cutter Distributed Enterprise Architecture Advisory Service, 2002. Meyer, B, Object Oriented Software Construction,Prentice-Hall, 1997, pp. 39-48. OMG, CORBA Basics, http://www.omg.org/gettingstarted/corbafaq.htm, current October 2002. Parnas, D., Clements, P, The Modular Structure of Complex Systems, IEEE, 1984. Stevens, M., Service-Oriented Architecture Introduction, Part 2, Developer.com, http://softwaredev.earthweb.com/msnet/article/0,,10527_1014371,00.html, current October 2002. Stevens, M., Multi-Grained Services, Developer.com, http://softwaredev.earthweb.com/java/sdjjavaee/article/0,,12396_1142661,00.html, current October 2002. Sun, Jini Technology Core Specification: LE-Distributed Leasing, http://wwws.sun.com/software/jini/specs/jini1.2html/lease-spec.html, current October 2002. Sun, Jini Technology Architectural Overview, http://wwws.sun.com/software/jini/whitepapers/architecture.html, 2001, current October 2002. Talking Blocks, Find Bind and Execute: Requirements for Web Service Lookup and Discovery, Whitepaper, January 8, 2001.
Samir Tata
83
References
Francisco Curbera, Web Services Overview, IBM T.J. Watson Research Center, http://www.llnl.gov/CASC/workshops/components_2001/viewgraphs/FranciscoCurbera.pd Clemens Vasters, Service Oriented Architectures, newtelligence AG, www.newtelligence.com
Samir Tata
84