11
Review
V. “Juggy” JagannathanAssociate Professor of Computer Science
West Virginia University
22
Focus of Global Knowledge Focus of Global Knowledge NetworksNetworks
Enterprise Application DevelopmentEnterprise Application Development Distributed Systems DevelopmentDistributed Systems Development Component-based Solution Component-based Solution
DevelopmentDevelopment Knowledge-based Solution Knowledge-based Solution
DevelopmentDevelopment
33
ASP & Enterprise ApplicationsASP & Enterprise Applications
Application Service Provider (ASP) provides Application Service Provider (ASP) provides applications to customers on a applications to customers on a subscription basis. ASPs provide for all the subscription basis. ASPs provide for all the infrastructure needs to host the application infrastructure needs to host the application and rely on Internet or Intranets to deliver and rely on Internet or Intranets to deliver the applications to customers. the applications to customers.
ASPs are Enterprise Applications and need ASPs are Enterprise Applications and need to satisfy a wide range of stringent to satisfy a wide range of stringent requirements.requirements.
44
Enterprise Application Enterprise Application RequirementsRequirements
FlexibilityFlexibility SecuritySecurity ReliabilityReliability AvailabilityAvailability ScalabilityScalability EvolvabilityEvolvability PerformancePerformance SupportabilitySupportability MaintainabilityMaintainability InteroperabilityInteroperability
Platform IndependencePlatform Independence Location IndependenceLocation Independence Open Standards and SystemsOpen Standards and Systems Architectural ChoicesArchitectural Choices
55
Platform ChoicesPlatform Choices
Platform StandardsPlatform Standards– Object Management Group (OMG) Object Management Group (OMG)
CORBA Infrastructure and approach CORBA Infrastructure and approach – Web services – the new kid on the blockWeb services – the new kid on the block
Other Popular PlatformsOther Popular Platforms– Sun J2EE PlatformSun J2EE Platform– Windows .NETWindows .NET
Host of other vendor platformsHost of other vendor platforms– OracleOracle– IBMIBM– IonaIona
66
CORBA Architecture – CORBA Architecture – Simple viewSimple view
ServersServers
ORB
C++JavaAda otherC C++JavaAda otherC
ClientsClients ServerServer
Client RequestsClient RequestsIDL-based
ServiceServiceIDL-based
77
Java and J2EE Java and J2EE PlatformPlatform
OverviewOverview
88
J2EEApplication
Server
J2EE ArchitectureJ2EE Architecture
JAF
JavaMail
JMS
JDB
C
JTA
JND
I
RM
I/IIOP
Servlets JSPsTag
Library
Web Container
JAF
JavaMail
JMS
JDB
C
JTA
JND
I
RM
I/IIOP
EJB Container
SessionBeans
EntityBeans
RDBMS Mail ServerJava App.
CORBA Server
DirectoryService
Message Queue
XHTMLXML
Applet
ClientApp.
HTTP(S)
Reproduced with Permission from Java Server Programming J2EE Edition – Wrox Press, Ltd, 2000
99
J2EE Platform ComponentsJ2EE Platform Components
JAXP 1.0 – Java API for JAXP 1.0 – Java API for XML ProcessingXML Processing
JDBC 3.0 – Java Data JDBC 3.0 – Java Data Base ConnectivityBase Connectivity
RMI over IIOPRMI over IIOP EJB 2.1 – Enterprise EJB 2.1 – Enterprise
Java BeansJava Beans Java Servlets 2.4Java Servlets 2.4 Java Server Pages 2.0Java Server Pages 2.0
Java Message Service 1.0Java Message Service 1.0 Java Naming and Java Naming and
Directory Interface (JNDI) Directory Interface (JNDI) 1.21.2
Java Transaction API 1.0Java Transaction API 1.0 JavaMail 1.1 J2EE JavaMail 1.1 J2EE
Connector Architecture Connector Architecture 1.01.0
Java Authentication and Java Authentication and Authorization Service 1.0Authorization Service 1.0
1010
J2EE PlatformJ2EE Platform
Strong and proven platformStrong and proven platform Evolving constantlyEvolving constantly Already supports various APIs Already supports various APIs
to develop and deploy web to develop and deploy web servicesservices
1111
.NET Platform.NET PlatformClient App. Users
Web Services
WebForms
.NET Framework
HT
TP
SO
AP
UD
DI
OD
BC
DC
OM
.NE
T
Web serversWeb serversWeb serversWeb serversWeb servers.NET servers
1212
.NET Components.NET Components .NET framework.NET framework
– Common Language Runtime (CLR) Common Language Runtime (CLR) librarylibrary
– ActiveX Data Objects - (ADO.NET)ActiveX Data Objects - (ADO.NET)– Active Server Pages – (ASP.NET) and Active Server Pages – (ASP.NET) and
supports Web Services (UDDI, WSDL & supports Web Services (UDDI, WSDL & SOAP)SOAP)
– .NET Compact framework for PDAs.NET Compact framework for PDAs– .NET Remoting (RPC support).NET Remoting (RPC support)
Visual Studio .NETVisual Studio .NET– VB, C++, C#, Jscript… all compile to VB, C++, C#, Jscript… all compile to
MSIL (Microsoft Intermediate Language) MSIL (Microsoft Intermediate Language) and utilize CLR. and utilize CLR.
1313
.NET Framework.NET Framework
Microsoft’s big push to open Microsoft’s big push to open standards and support for XML-standards and support for XML-based solutionsbased solutions
Fully supports web services Fully supports web services approachapproach
Microsoft is an active participant in Microsoft is an active participant in W3C efforts and is a strong W3C efforts and is a strong proponent of standardization of web proponent of standardization of web services and related technologies. services and related technologies.
1414
XML Technology XML Technology OverviewOverview
1515
Emerging Importance of XMLEmerging Importance of XML
HTML-tagging is display oriented.HTML-tagging is display oriented. XML-based content tagging has important uses:XML-based content tagging has important uses:
– data miningdata mining– role-oriented display customizationrole-oriented display customization– intelligent searching and other value added intelligent searching and other value added
elementselements Wide spread industry support for this new open Wide spread industry support for this new open
standardstandard– MicrosoftMicrosoft– NetscapeNetscape– W3C is pushing the standardization effortsW3C is pushing the standardization efforts
Complementary technology to HTML-based web Complementary technology to HTML-based web browsersbrowsers
Why do we care about XML?
1616
Requirements best addressed by XML ?Requirements best addressed by XML ?
Customizing front-end applications - Customizing front-end applications - easy presentation of what users want easy presentation of what users want to seeto see
Data miningData mining Synthesis type applications - Synthesis type applications -
combining multiple information combining multiple information sourcessources
Electronic commerce-type Electronic commerce-type applicationsapplications
Structured Data ExchangeStructured Data Exchange
1717
XML MarkupXML Markup
Elements and attributesElements and attributes Entity ReferencesEntity References CommentsComments Processing InstructionsProcessing Instructions Marked SectionsMarked Sections Document Type Definitions Document Type Definitions
(DTDs)(DTDs) Now, XML SchemasNow, XML Schemas
1818
ElementsElements
Bounded by start and end tagsBounded by start and end tags Sample markupSample markup
<Patient> <Patient> <FirstName> Frank</FirstName> <FirstName> Frank</FirstName> <LastName> Foster</LastName> <LastName> Foster</LastName>
</Patient></Patient> Patient, LastName, FirstName Patient, LastName, FirstName
are all entity tags.are all entity tags.
1919
AttributesAttributes
Name-value pairs included as part of Name-value pairs included as part of start tags.start tags.
Sample markupSample markup<APatient patientID=“123” FirstName=“Frank” <APatient patientID=“123” FirstName=“Frank”
LastName=“Foster”>LastName=“Foster”>
<Insurance> Blue Cross </Insurance><Insurance> Blue Cross </Insurance>
<Insurance> HMO </Insurance> <Insurance> HMO </Insurance>
</APatient></APatient>
FirstName and LastName in the example FirstName and LastName in the example above are attribute declarations.above are attribute declarations.
2020
Document Type DefinitionsDocument Type Definitions
Allows the expression of Allows the expression of constraints on tagsconstraints on tags
Defines sequencing and nesting Defines sequencing and nesting of tagsof tags
Defines attributes and values Defines attributes and values and defaultsand defaults
Allows specification of external Allows specification of external file referencesfile references
2121
XML SchemasXML Schemas
Replaces DTDsReplaces DTDs Is in XML format (DTD’s are Is in XML format (DTD’s are
not)not) Supports data typing (DTD’s Supports data typing (DTD’s
didn't)didn't) Schemas are extensibleSchemas are extensible XML Schemas – next XML Schemas – next
generation of DTDs.generation of DTDs. Wide industry supportWide industry support
2222
XML’s evolving family of standardsXML’s evolving family of standards
XML Linking Specification (XLL)XML Linking Specification (XLL) Resource Directory Framework (RDF)Resource Directory Framework (RDF) Style sheetsStyle sheets
– CSS Cascading Style sheetsCSS Cascading Style sheets– XSL - XML Style sheet Specification XSL - XML Style sheet Specification
LanguageLanguage Document Object Model (DOM)Document Object Model (DOM) XML SchemasXML Schemas Provides the basis for Web Services Provides the basis for Web Services
and Simple Object Access Protocol and Simple Object Access Protocol (SOAP)(SOAP)
2323
Web ServicesWeb Services
2424
Web Service DefinitionWeb Service Definition
A Web service is a software system designed A Web service is a software system designed to support interoperable machine-to-to support interoperable machine-to-machine interaction over a network. It has machine interaction over a network. It has an interface described in a machine- an interface described in a machine- processable format (specifically WSDL). processable format (specifically WSDL). Other systems interact with the Web Other systems interact with the Web service in a manner prescribed by its service in a manner prescribed by its description using SOAP messages, description using SOAP messages, typically conveyed using HTTP with an typically conveyed using HTTP with an XML serialization in conjunction with other XML serialization in conjunction with other Web-related standards.Web-related standards.
Source: W3C definition: http://www.w3.org/TR/2004/NOTE-ws-arch-20040211/
2525
What are XML Web Services?What are XML Web Services?
Interaction using standard Interaction using standard internet protocolsinternet protocols
A vehicle used to integrate A vehicle used to integrate other applicationsother applications
Expose functionality through Expose functionality through well-defined interfaceswell-defined interfaces
Can be advertised in a Can be advertised in a registry/directory.registry/directory.
2626
Web Services ArchitectureWeb Services Architecture
http://www.w3.org/TR/2004/NOTE-http://www.w3.org/TR/2004/NOTE-ws-arch-20040211/ws-arch-20040211/
2727
Different Models supported by Web Different Models supported by Web ServicesServices
Message Oriented ModelMessage Oriented Model Service Oriented ModelService Oriented Model Resource Oriented ModelResource Oriented Model Policy ModelPolicy Model
2828
Example XML Web Services?Example XML Web Services?
Information servicesInformation services Centralization servicesCentralization services Data Integration, Data Integration,
Aggregation and AnalysisAggregation and Analysis Extending and Integrating Extending and Integrating
ApplicationsApplications Peer-and-Push-based Peer-and-Push-based
systemssystems
2929
Benefits of Web Services?Benefits of Web Services?
Standards basedStandards based Vendor neutralVendor neutral SimplicitySimplicity Language and Platform Language and Platform
IndependenceIndependence Functional AbstractionFunctional Abstraction DiscoverableDiscoverable Reduced Development timeReduced Development time
3030
When not to use Web When not to use Web Services?Services?
Closed systemsClosed systems Critical Performance Critical Performance
requirementsrequirements Technical limitations – like Technical limitations – like
transaction support and transaction support and security elements have not security elements have not been standardizedbeen standardized
3131
Web Services EnsembleWeb Services EnsembleDiscovery
UDDI
DescriptionWSDL
MessagingSOAP
EncodingXML
TransportHTTP
3232
Web Services Web Services Definition Definition LanguageLanguage
WSDLWSDL
3333
What is WSDL?What is WSDL? Web Services Definition LanguageWeb Services Definition Language It is equivalent of IDL for Web ServicesIt is equivalent of IDL for Web Services It is in XML Schema formatIt is in XML Schema format It defines an EXTENSIBLE framework for It defines an EXTENSIBLE framework for
specifying web services interfacesspecifying web services interfaces Developed originally by Microsoft and IBM Developed originally by Microsoft and IBM
and now being put through its paces in and now being put through its paces in W3C.W3C.
W3C working on Version 1.2 of WSDL right W3C working on Version 1.2 of WSDL right now (Fall 2003).now (Fall 2003).
3434
WSDL: What does it support?WSDL: What does it support?
Data type definitionsData type definitions Messages supportedMessages supported Operations supportedOperations supported Port type (an aggregation of Port type (an aggregation of
messages and operations)messages and operations) Binding (what protocol supports the Binding (what protocol supports the
service – ala SOAP)service – ala SOAP) Port – target address where service Port – target address where service
is availableis available Service – aggregation of port typesService – aggregation of port types
3535
WSDL ServiceWSDL Service
WSDL WSDL specifications are specifications are published in a published in a URL.URL.
Clients download Clients download this specification, this specification, pick a particular pick a particular protocol to protocol to communicate communicate with the service with the service (binding) and use (binding) and use that protocol.that protocol.
OperationOperation
Operation
BindingBindingBinding
Port Type
OperationOperation
Operation
BindingBindingBinding
Port Type
OperationOperation
Operation
BindingBindingBinding
Port Type
Web Service
3636
SOAP...SOAP...
It is a It is a SSimple imple PProtocol that allows rotocol that allows you to you to AAccess an ccess an OObject through bject through
the net.the net.Courtesy: Yan Liu, my student.
3737
SOAP MotivationsSOAP Motivations
Heterogeneous systems Heterogeneous systems mustmust be able be able to communicateto communicate
Binary protocols don’t always workBinary protocols don’t always work– CORBA, DCOM, etc. don’t work well through CORBA, DCOM, etc. don’t work well through
firewallsfirewalls– Nobody can agree on a standard binary format Nobody can agree on a standard binary format
(usually due to platform-related issues)(usually due to platform-related issues)– We’re dealing with many heterogeneous We’re dealing with many heterogeneous
environments (MVS, Unix, Windows NT, Linux, environments (MVS, Unix, Windows NT, Linux, PalmOS, etc.)PalmOS, etc.)
– Component runtimes differComponent runtimes differ– Security models differ (Kerberos, NTLM, OSF-DCE)Security models differ (Kerberos, NTLM, OSF-DCE)
Courtesy: Yan Liu, my student.
3838
What SOAP is...What SOAP is...
SOAP is a specification for defining...SOAP is a specification for defining...– an encoding style that uses XML to an encoding style that uses XML to
represent information graphsrepresent information graphs– a standard way to move XML with HTTPa standard way to move XML with HTTP– rules for passing messagesrules for passing messages– error (fault) definitionerror (fault) definition– a medium for performing Remote a medium for performing Remote
Procedure Calls (RPC)Procedure Calls (RPC)– one layer in a multi-layer architectureone layer in a multi-layer architecture
Courtesy: Yan Liu, my student.
3939
Courtesy: Yan Liu, my student.
SOAP Contains Four Parts:SOAP Contains Four Parts:
An extensible envelope expressing An extensible envelope expressing (mandatory)(mandatory)– whatwhat features and services are represented in a features and services are represented in a
message;message;– whowho should deal with them, should deal with them,– whetherwhether they are optional or mandatory. they are optional or mandatory.
A set of encoding rules for data A set of encoding rules for data (optional)(optional)– Exchange instances of application-defined data types Exchange instances of application-defined data types
and directed graphsand directed graphs– Uniform model for serializing abstract data models Uniform model for serializing abstract data models
that can not directly be expressed in XML schemathat can not directly be expressed in XML schema A Convention for representation RPC A Convention for representation RPC (optional)(optional)
– How to make calls and responsesHow to make calls and responses A protocol binding to A protocol binding to HTTPHTTP and and HTTP-EFHTTP-EF (optional)(optional)
4040
<Envelope>
<Header>
<transId>1234</transId>
</Header>
<Body>
<Add>
<a>3</a>
<b>4</b>
</Add>
</Body>
</Envelope>
c = Add(a, b)
Courtesy: Yan Liu, my student.
SOAP - Simple ExampleSOAP - Simple Example
4141
<<Envelope>Envelope> <Header><Header> <transId>1234</transId><transId>1234</transId> </Header></Header> <Body><Body> <Add><Add> <a>3</a><a>3</a> <b>4</b><b>4</b> </Add></Add> </Body></Body></Envelope></Envelope>
<<Envelope>Envelope> <Header><Header> <transId>1234</transId><transId>1234</transId> </Header></Header> <Body><Body> <AddResponse><AddResponse> <c>7</c><c>7</c> </AddResponse></AddResponse> </Body></Body></Envelope></Envelope>
Courtesy: Yan Liu, my student.
System Flow (HTTP)System Flow (HTTP)
4242
SOAP – Example from SOAP – Example from healthcarehealthcare
Example RequestExample Request
<soap:Envelope> <soap:Envelope>
<header> …. </header><header> …. </header>
<soap:Body> <soap:Body>
<GetName> <GetName>
<MR#>123456</MR#> <MR#>123456</MR#>
</GetName> </GetName>
</soap:Body> </soap:Body>
</soap:Envelope></soap:Envelope>
Example Example ResponseResponse
<soap:Envelope> <soap:Envelope> <header> …. </header><header> …. </header> <soap:Body> <soap:Body> <GetNameResponse> <GetNameResponse> <Name>John <Name>John
Doe</Name> Doe</Name> </GetNameResponse> </GetNameResponse> </soap:Body> </soap:Body> </soap:Envelope></soap:Envelope>
4343
Transport (e.g. HTTP)
Application
Envelope/Header/Body
TCP/IP
Message Encoding
Transport (e.g. HTTP)
Web Service
Envelope/Header/Body
TCP/IP
Message Encoding
Interface Semantics Interface Semantics
SOAP ExecutionSOAP Execution
Courtesy: Yan Liu, my student.
4444
SOAP – ConclusionsSOAP – Conclusions
Basis for Web servicesBasis for Web services Significant component of Significant component of
Microsoft’s .NET platformMicrosoft’s .NET platform Supported by everyoneSupported by everyone Has a strong futureHas a strong future
4545
Universal Universal Description, Description,
Discovery and Discovery and IntegrationIntegration
(UDDI)(UDDI)
4646
UDDI – What is it?UDDI – What is it?
A vehicle to locate operational A vehicle to locate operational web servicesweb services
Similar to Domain Name Similar to Domain Name Service (DNS) lookupService (DNS) lookup
Embodies the concepts of Embodies the concepts of “White Pages and Yellow “White Pages and Yellow Pages”.Pages”.
4747
UDDI ElementsUDDI Elements
White Pages: Business Name, White Pages: Business Name, Contact Info, DUNS etcContact Info, DUNS etc
Yellow Pages: Business Yellow Pages: Business categories, key-value pairs of categories, key-value pairs of relevant informationrelevant information
Green Pages: Technical Green Pages: Technical information on how to connect information on how to connect to web servicesto web services
4848
UDDI Process SupportedUDDI Process Supported
Business registers its web service Business registers its web service (information that put in white, yellow (information that put in white, yellow and green pages).and green pages).
The information gets propagated to The information gets propagated to all UDDI servers (replicated)all UDDI servers (replicated)
Customers contact known registriesCustomers contact known registries Locate appropriate service and Locate appropriate service and
invoke them.invoke them. Main protocol supported is SOAP.Main protocol supported is SOAP.
4949
Web Services Current StatusWeb Services Current Status
Evolving rapidly – strong support for Evolving rapidly – strong support for SOAP and WSDL has decent support.SOAP and WSDL has decent support.
UDDI is little further away.UDDI is little further away. All vendors are incorporating various All vendors are incorporating various
components of Web servicescomponents of Web services Web services is the future – right Web services is the future – right
now people have to deal with other now people have to deal with other component technologiescomponent technologies
Top Related