Web Services

41
1 Web Services Chidi Ononiwu

description

Web services

Transcript of Web Services

Page 1: Web Services

1

Web ServicesChidi Ononiwu

Page 2: Web Services
Page 3: Web Services

Challenges

Page 4: Web Services

Web Services

Page 5: Web Services

Web Services

XML, WSDL, SOAP and UDDI are the core technologies behind web services.

Accessible over the Web. Use platform-independent and language-neutral web

protocols. Web services provide interfaces which can call from other

programs. Can be published because it is based on open

technology standards. Facilitate integration. Support loosely coupled connections between systems.

Page 6: Web Services

Web Services Stack

Page 7: Web Services

Web Services components

XML

WSDL

UDDI

ComponentsComponents

Web Services

SOAP

Page 8: Web Services

Extensible Markup Language (XML)

Page 9: Web Services

What is URI often used in XML

Page 10: Web Services

Extensible Markup Language (XML)

Page 11: Web Services

Extensible Markup Language (XML)

XML or Extensible Markup Language is a meta-markup language that provides a format for describing structured data

XML is the universal format for structured documents and data

XML provides a standard for more precise declarations of content and more meaningful search results across loosely coupled applications

It provides the basic functionality of defining and transforming data

Page 12: Web Services

Extensible Markup Language (XML)

It is application independent hence incorporating flexibility, reusability and interoperability (Deitel etal 2003).

Thus XML can improve web functionality and interoperability.

The use of XML can also simplify the integration with external data sources guaranteeing organisations requesting and obtaining information in real time and transform it to XML format.

Page 13: Web Services

Extensible Markup Language (XML)

Page 14: Web Services

Extensible Markup Language (XML)

Page 15: Web Services

Extensible Markup Language (XML)

Schema

DTD

Style sheet

XML XML

Page 16: Web Services

DTDs Define Structure, but

Not Content Author can Override a

DTD within a Document Best Used for

Interactively Authoring an XML Document

Schema Define Structure

And Data Content Author can Not

Override a Schema within a Document

Best Used to Validate Program Input

Style sheet By separating content from format, you canapplied to the same XML document Any style sheet changes will be automatically reflected in any Web page based upon the style sheet

Extensible Markup Language (XML)

Page 17: Web Services

Simple Object Access Protocol (SOAP)

SOAP is an XML-based communication protocol.

SOAP uses XML Features. Purpose to support system communications.

When a SOAP client or server sends a message, it wraps the XML content in an outer XML document. A SOAP message is simply an XML document that provides a

messaging wrapper around the XML payload.

The message has an Envelope element that identifies the message boundary and includes: an optional Header element (containing meta-data, system-level

data or other auxiliary information); and a Body element, containing the XML payload.

Page 18: Web Services

Simple Object Access Protocol (SOAP)

Page 19: Web Services

SOAP is on issues such as routing of SOAP messages encapsulated in HTTP.

It guarantees reliable data transfer firewall traversal and not on the semantics of

application-specific data it conveys. SOAP provides the framework by which

application-specific information may be conveyed in an extensible manner.

Simple Object Access Protocol (SOAP)

Page 20: Web Services

Simple Object Access Protocol (SOAP)Depicting Encapsulation

Page 21: Web Services

Simple Object Access Protocol (SOAP)

Page 22: Web Services

Simple Object Access Protocol (SOAP)

Page 23: Web Services

Simple Object Access Protocol (SOAP)

Page 24: Web Services

Web services Description Language (WSDL)

Page 25: Web Services

Web services Description Language (WSDL)

Page 26: Web Services

WSDL usage

WSDL offers a standard way to abstractly describe the operations and messages offering as the service interface definition.

These descriptions are bound to a specific network protocol and message format to create an endpoint.

It provides information such as the data type definitions, operations to be performed, service binding information and the address information

It stands as an agreement between the provider and consumer of the service.

Page 27: Web Services

By employing WSDL standard, organizations are sharing the same standards for data description and connection protocols, which to them reduce application development time and cost and facilitate the integration. The consistent interface and infrastructure reuse can also simplify integration with other services.

This enables tighter business relationships more efficient business processes.

Thus increase customers’ satisfactions and gives organisation competitive advantages

WSDL Roles

Page 28: Web Services

Universal Description, Discovery and Integration (UDDI)

Definition :UDDI is a platform-independent, XML-based for worldwide web services directory over the network

UDDI is an XML based web service directory which serves as public UDDI, for listing global businesses and their services on the internet or private UDDI within their private network. It is sometime refer to as yellow page, white page and green page.

Based on this, service consumers or requesters search and bind to the existing services

Page 29: Web Services

Universal Description, Discovery and Integration (UDDI)

Allow businesses to public themselves Allow businesses to locate each other Similar to:

• White Pages — General Information: name, address, and contact

• Yellow Pages — industrial categorizations: index of Product categories

• Green Pages — technical information about services exposed by the business: trading rule, network description

Page 30: Web Services

How UDDI Works

UDDI Registry

3. Registry operator assigns a unique identifier to each service and business registration

Marketplaces, search engines, and business apps query the registry to discover services at other companies

4.

Service TypeRegistrations

SW companies, standards bodies, and programmers populate the registry withdescriptions of different types of services

1.

BusinessRegistrationsBusinesses

populate the registry withdescriptions of the services they support

2.

Business uses this data to facilitate easier integration with each other over the Web

5.

Source: International Business Machines Corporation .

Page 31: Web Services
Page 32: Web Services

Universal Description, Discovery and Integration (UDDI)

This directory is compiled based on business needs and is mapped to the actual technical information stored in a WSDL.

UDDI enables developers and businesses to publish and locate web services on a network.

This enables businesses to quickly, easily and dynamically find and transact with one another

UDDI simplifies the process of creating B2B relationships, thus increase the collaboration among customers, service providers and intermediaries (Deitel et al., 2003)

Page 33: Web Services

Business Benefits of Web services

Reduce the cost of operationsLeverage the best products and services of others as neededFind and use others' best processes without today's lengthy negotiationsSave on business process integration costsConnect dynamically with partners, at will, and execute transactions in real time withouttime-consuming manual processesReduce the up-front cost of changing business models to gain advantage in the marketBe able to change your business without changing your systemsReduce the cost of development and the time required to implementsolutionsCreate Web services from your existing applications and processesFind best-of-breed services from others and dynamically adding them to your applicationswithout custom codingMake use of expertise not available internally, while you stay focused on what you do best

Increase revenue

Page 34: Web Services

Business Roles being PursuedService RequesterUser of Service (Business/Consumer): Integration of webservices with intention to reduce operational costs or improveflexibility of choice.Business Model: Aggregator or to improve efficiencies toincrease profitService ProviderProducer of Service OfferingsBusiness Revenue Model: Transactional, Subscription, LeaseRegistry / BrokerProvider of DirectoryIntelligent directory supporting searches and service policyBusiness Revenue Model: Registration, Advertising, additionalvalue add services

RegistrarProvider of advanced registration and search servicesinto a RegistryBusiness Revenue Model: RegistrationAggregator/PortalService provider of combined servicesIntermediary. Such a company would be a WebServices Service ProviderBusiness Revenue Model: Registration, Transactional,Subscription

Page 35: Web Services

Business scenarioA company called VCK Inc., which manufactures certain food products and markets in the Victoria State.- Melbourne The company is headquartered in Melbourne. VCKInc., wants to publish its Inventory Availability Web Service, so that its vendors can see online inventory. VCK Inc. decides to publish the Web Services

Technical scenarioFor UDDI business registration, VCK Inc. uses a tool such as IBM iseries, or Java Message for XML (JMX) to create an XML file used to describe a business entity and its Web Services.

The information that will be provided in a UDDI business registration will consist of three components: “white pages” which include address and contact information,

“yellow pages” which include business categorizations

and “green pages”, the technical information about services that are provided by the business.

Then the web services can be published in the UDDI registry under Food manufacturing domain.

Page 36: Web Services

The POC Web services Application

Description

A POC manufacturing company producing different brands of PCs plans to automate its customer enquiry and sales order processing system by exposing these functions as Web services for its customers. It also automates its supply chain process by dynamically interacting with part vendors for purchase of computer accessories. The manufacturer, customer, and vendor applications could be behind a firewall and possibly be running on different platforms and/or using a language of their choice. Clearly, an architecture merely based on component technologies cannot meet the desired objectives. To illustrate the interoperability among these diverse systems, the different vendor applications in this POC have been developed using the Java/J2EE, Java/Axis, and C#/Microsoft .NET platforms. Manufacturer using Web services to interact with each one of these vendors identically.

Page 37: Web Services

Typical business scenario.

Page 38: Web Services

The process flow

The manufacturing company interacts with several part vendors to procure computer accessories

It performs a search on the public registry (logically similar to the way a search engine searches the Web for key words) and dynamically locates potential vendors on the Internet to obtain price quotes to select the best vendor.

Parts vendors make themselves known to the outside world by 'publishing' their services in a public XML Registry.

The registry typically contains brief information about the company, the various services they offer, the endpoint URL for Web services interaction, type of binding supported, and possibly an external link for extra information.

Organizations are listed in the registry based on standard classification schemes.

The parts vendors expose functions for providing information such as parts detail and price quote as Web services.

Page 39: Web Services

Business benefits and interactions

Customers or dealers trade directly by interacting with the manufacturing company using Web services to view product list, view order status, place orders, and so forth for the purchase of PCs.

This eventually results in substantial cost reductions in terms of time and resources for the manufacturer. In addition, it also provides improved customer service and helps customers automate their systems as well.

The manufacturer application features administrative functions such as: Product and customer maintenance View and approve customer orders and Get best quote and part details from vendors

The manufacturing company exposes functions such as customer/product enquiry, order status, place order, and so on as Web services for consumption by the customers/dealers.

Page 40: Web Services

Example of the Purchase Order that is encapsulated in SOAP forVCK company

<?xml version="1.0" encoding="UTF-8"?> <soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">  <soap-env:Header>   <From>JOHNS</From>   <To>Manufacturer</To>  </soap-env:Header>  <soap-env:Body>  <PurchaseOrder custId="JOHNS" poRef="JOHNS1048316652804" poDate="20030322" poValue="25235">   <billTo country="AE">    <name>John Simon</name>    <street>P.O Box 00001</street>    <city>Dubai</city>    <state>Dubai</state>    <zip>00001</zip>   </billTo>      

Page 41: Web Services

<shipTo country="AE">    <name>John Simon</name>    <street>P.O Box 00001</street>    <city>Dubai</city>    <state>Dubai</state>    <zip>00001</zip>   </shipTo><orderItems>    <orderItem partNum="2512EA">     <productName>Presario-2512EA Laptop PC</productName>     <quantity>2</quantity>     <price>5725.0</price>     <desc>Intel-P4, 2.5GHz, 256MB RAM, 40GB HDD, 15" XGA</desc>    </orderItem>    <orderItem partNum="2125EA">     <productName>Presario-2125EA Laptop PC</productName>     <quantity>3</quantity>     <price>4595.0</price>     <desc>Intel-M Celeron, 2.0GHz, 256MB RAM, 30GB HDD, 15" XGA</desc>    </orderItem>   </orderItems>  </PurchaseOrder> </soap-env:Body></soap-env:Envelope>