Presentation is loading. Please wait.

Presentation is loading. Please wait.

Enterprise Computing: Web Services

Similar presentations


Presentation on theme: "Enterprise Computing: Web Services"— Presentation transcript:

1 Enterprise Computing: Web Services

2 Exercise What is wrong with JEE?
Why would you not use it for web-based application integration? Why would you not use it for intranet-based application integration?

3 Web Services: Definitions
A Web service is a collection of functions that are packaged as a single entity and published to the network for use by other programs. Web services are building blocks for creating open distributed systems, and allow companies and individuals to quickly and cheaply make their digital assets available worldwide. Web Service standards form a platform-independent, open framework for describing services, discovering businesses, and integrating business services.

4 eXtensible Markup Language
A common data format derived from SGML Language independent, hierarchical and self-describing Uses tag-based structure similar to HTML to define XML documents <?xml version="1.0" encoding="ISO " ?> <bankaccount type=“Current”>   <name>John Smith</name>   <address> <line 1>1 Grafton Street </line1> <line 2>Dublin 2, Ireland </line2> </address> </bankaccount> Supports arbitrarily complex data formats Schema (defined in xsd files) can be used to define document formats Fragment defining a BankAccount as a type of financial record <xsd:element name="purchaseOrder" type="PurchaseOrderType"/>

5 eXtensible Markup Language
Independent of IT infrastructure Separates the what from the how Many industry based schema standards have been developed For example, Financial Services: ISO15022 (SWIFT, FIX, FpML) XBRL (business reporting) Any XML based infrastructure can handle multiple and evolving schema standards without excessive cost Due to changes in business relationships Due to regulatory changes (e.g. Basil II) Due to evolution of the schemas themselves

6 The Web Services architecture
UDDI Registry Web Services is based on three standards Simple Object Access Protocol (SOAP) defines the communication mechanism Universal Directory Discovery Interface (UDDI) defines the registry of interface definitions Web Service Definition Language defines the actual interfaces 2. Request contract information 3. Retrieve WSDL definition Service Consumer WSDL WSDL 4. Exchange SOAP messages Service Provider 1. Register contract information

7 SOAP- Simple Object Access Protocol
SOAP1.1 Message Structure XML based protocol for exchange of information Encoding rules for datatype instances Convention for representing RPC invocations Used with XML Schema Normally HTTP-based Uses Request/Response Two different modes RPC Document SOAP with Attachments allow arbitrary data to be packaged. SOAP Envelope Header Entries Header Body Fault Element

8 SOAP Example: Request Sample SOAP Message embedded in an HTTP Request
POST /StockQuote HTTP/1.1 Host: Content-Type: text/xml; charset="utf-8" Content-Length: 1024 SOAPAction: " <env:Envelope xmlns:env=" > <env:Body> <m:GetLastTradePrice env:encodingStyle=" xmlns:m=" <symbol>IBM</symbol> </m:GetLastTradePrice> </env:Body> </env:Envelope>

9 SOAP Example: Response
SOAP message sent by the StockQuote service in the corresponding HTTP response to the request HTTP/ OK Content-Type: text/xml; charset="utf-8" Content-Length: 512 <env:Envelope xmlns:env=" > <env:Body> <m:GetLastTradePriceResponse env:encodingStyle=" xmlns:m=" <Price>97.5</Price> </m:GetLastTradePriceResponse> </env:Body> </env:Envelope>

10 UDDI Universal Description, Discovery and Integration
Platform-independent, open framework for describing services, discovering businesses, and integrating business services. A DNS-like model implementation of the directory Originally intended to support global registries Created during the .com bubble. Includes White, Green and Yellow Pages for search purposes Now primarily inside organisations if at all

11 Web Service Description Language (WSDL)
Interface definition language in XML Conceptually, no different from Enterprise Java Bean or Common Gateway Interface Based on XML Schema Can appear to be very verbose An interface description is a contract between the server developers and the client developers WSDL describes the web service Similar to Java method signatures

12 Interoperability Challenges
Interoperability remains the chief challenge of web services Complex and imprecise standard Tools generating SOAP, WSDL, UDDI, etc. need to be interoperable Web Services Interoperability (WS-I) focus on creating to Interoperability WS-I Basic Profile 1.0 defines an interoperable web services platform

13 WS-I Basic Profile V1.2 in draft form WS-I Basic Profile 1.1: SOAP 1.1
WSDL 1.1 Must use HTTP binding, should use HTTP 1.1 XML Schema Part 1, Part 2 May use HTTPS SOAP messages should use document/literal V1.2 in draft form

14 Web Services: Another approach to distributed computing
Builds on the legacy of CORBA, J2EE etc It is not a new component model, programming model or programming language. UDDI/WSDL/SOAP provide another distributed computing technology Standards developing for the Quality of Services and other EAI-type functionality. Exercise: Write down the standards for J2EE Quality Of Service Discovery Description Messaging Transport

15 Web Services: Another approach to distributed computing
WS- Reliable Messaging WS- Security WS- BA Quality Of Service WS- Coordination UDDI Discovery XSD, WSDL, WS-Policy Description SOAP Messaging XML HTTP, MQ, SMTP Transport

16 Web Services Strengths
Interoperability Based on open standards, utilizes existing infrastructure Can be accessed from any programming language/model Ubiquity Communicates through XML/HTTP – Any system that supports these standards, supports Web Services Support from all major software vendors (IBM and Microsoft) Low barrier to entry Concepts easy to understand, easy to implement Toolkits allow COM, JEE, and CORBA components to be exposed as Web Services

17 Web Services and XML/WS standards
Java API for XML Parsing (JAXP) JAXP enables applications to parse and transform XML documents Independent of XML processor implementation JAXP includes common industry standard components/interfaces DOM (Document Object Model and SAX (Simple API for XML Processing) XSLT (XML Style Language Transformations) JAXP adds additional functionality beyond these standards Java API for XML Remote Procedure Call (JAX-RPC) SOAP (Simple Object Access Protocol) 1.1 specification Java API for XML Registries (JAX-R) APIs to access UDDI Registry


Download ppt "Enterprise Computing: Web Services"

Similar presentations


Ads by Google