+ All Categories
Home > Documents > WEB SERVICES INTRODUCTION A WEB SERVICE is an application that accepts requests from other systems...

WEB SERVICES INTRODUCTION A WEB SERVICE is an application that accepts requests from other systems...

Date post: 30-Mar-2015
Category:
Upload: ruben-oram
View: 218 times
Download: 2 times
Share this document with a friend
Popular Tags:
35
WEB SERVICES INTRODUCTION •A WEB SERVICE is an application that accepts requests from other systems across the Internet or an Intranet, mediated by lightweight, vendor- neutral communications technologies • The XML standards which a web services system is built upon allows for an implementation-neutral approach to performing business collaborations. This talk is about Java and XML technology approach for implementing a web services architecture
Transcript
Page 1: WEB SERVICES INTRODUCTION A WEB SERVICE is an application that accepts requests from other systems across the Internet or an Intranet, mediated by lightweight,

WEB SERVICES

INTRODUCTION

• A WEB SERVICE is an application that accepts requests from other systems across the Internet or an Intranet, mediated by lightweight, vendor-neutral communications technologies

• The XML standards which a web services system is built upon allows for an implementation-neutral approach to performing business collaborations.

• This talk is about Java and XML technology approach for implementing a web services architecture

Page 2: WEB SERVICES INTRODUCTION A WEB SERVICE is an application that accepts requests from other systems across the Internet or an Intranet, mediated by lightweight,

WEB SERVICES

OVERVIEW• There have been many barriers to two or more businesses

collaborating in electronic transactions

• Major challenges in building a web service

1. Build client-tier connectivity

2. Implement the web service

3. Connect to back-end systems

• Java 2 Platform, Enterprise Edition (J2EE) can be used to achieve these goals

Page 3: WEB SERVICES INTRODUCTION A WEB SERVICE is an application that accepts requests from other systems across the Internet or an Intranet, mediated by lightweight,

WEB SERVICES

WEB SERVICES DEVELOPMENT MODEL WITH J2EE

Relies on two technologies

• XML technologies

» XML is a data format that represents data in a serialized form that can be transported over the network from one endpoint to another

• Java technology

» Developers have the APIs necessary to build a web service using J2EE

» Ex : the Java API for XML Parsing (JAXP)

Page 4: WEB SERVICES INTRODUCTION A WEB SERVICE is an application that accepts requests from other systems across the Internet or an Intranet, mediated by lightweight,

WEB SERVICES

Page 5: WEB SERVICES INTRODUCTION A WEB SERVICE is an application that accepts requests from other systems across the Internet or an Intranet, mediated by lightweight,

WEB SERVICES

CLIENT TIER CONNECTIVITY

Client Tier Connectivity refers to how consumers

of web services access your system.

Page 6: WEB SERVICES INTRODUCTION A WEB SERVICE is an application that accepts requests from other systems across the Internet or an Intranet, mediated by lightweight,

WEB SERVICES

Types of clients

Page 7: WEB SERVICES INTRODUCTION A WEB SERVICE is an application that accepts requests from other systems across the Internet or an Intranet, mediated by lightweight,

WEB SERVICES

Business Partner Connectivity

• Business partners could be using a variety of programming languages, middleware, and hardware

• When a business partner calls your system, the web service request arrives in the form of an XML document

• When a business partner issues a request to a web service, the recipient of the XML document is a Java servlet

Page 8: WEB SERVICES INTRODUCTION A WEB SERVICE is an application that accepts requests from other systems across the Internet or an Intranet, mediated by lightweight,

WEB SERVICES

Processing a business partner request

Page 9: WEB SERVICES INTRODUCTION A WEB SERVICE is an application that accepts requests from other systems across the Internet or an Intranet, mediated by lightweight,

WEB SERVICES

• To Achieve this level of business partner connectivity, there must be a way to

– Publish

– Describe

– Locate

– Call a web service

Page 10: WEB SERVICES INTRODUCTION A WEB SERVICE is an application that accepts requests from other systems across the Internet or an Intranet, mediated by lightweight,

WEB SERVICES

Universal Description, Discovery, and Integration

(UDDI)• Project aimed towards providers and seekers of web

services

• Members of the UDDI Project operate a web service called the UDDI Business Registry (UBR), which is global, public directory of businesses and services.

• Web service providers can register and describe their services in the UBR. Users can query the UBR to discover web services and to locate information needed to interoperate with the services.

Page 11: WEB SERVICES INTRODUCTION A WEB SERVICE is an application that accepts requests from other systems across the Internet or an Intranet, mediated by lightweight,

WEB SERVICES

How UDDI Works

UDDI Business Registry

3. UBR assigns a programmatically unique identifier to each service and business registration

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

4.

Segrvice TypeReistrations

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.

Page 12: WEB SERVICES INTRODUCTION A WEB SERVICE is an application that accepts requests from other systems across the Internet or an Intranet, mediated by lightweight,

WEB SERVICES

Registry Data

• Businesses register public informationabout themselves

• Standards bodies, Programmers, Businesses register information about their Service Types

WhitePages

YellowPages

GreenPages

Service TypeRegistrations

Page 13: WEB SERVICES INTRODUCTION A WEB SERVICE is an application that accepts requests from other systems across the Internet or an Intranet, mediated by lightweight,

WEB SERVICES

• White Pages

– Business Name, Text Description , Contact info-names, phone numbers, fax numbers, web sites…

– Known Identifiers

• list of identifiers that a business may be known by - DUNS, Thomas, other

• Yellow Pages

– Business categories

• 3 standard taxonomies

– Industry: NAICS (Industry codes - US Govt.)

– Product/Services: UN/SPSC (ECMA)

– Location: Geographical taxonomy

• Implemented as name-value pairs to allow any valid taxonomy identifier to be attached to the business white page

• Green Pages

– New set of information businesses use to describe how to “do e-commerce” with them

Page 14: WEB SERVICES INTRODUCTION A WEB SERVICE is an application that accepts requests from other systems across the Internet or an Intranet, mediated by lightweight,

WEB SERVICES

Service Type Registration

• Pointer to the namespace where service type is described

– What programmers read to understand how to use the service

• Identifier for who published the service

• Identifier for the service type registration

– called a tModelKey

– Used as a signature by web sites that implement those services

Page 15: WEB SERVICES INTRODUCTION A WEB SERVICE is an application that accepts requests from other systems across the Internet or an Intranet, mediated by lightweight,

WEB SERVICES

businessEntitybusinessKeynameURLdescriptioncontactsbusinessServicesidentifierBagcategoryBag

PhoneAddressEmail

Contact

businessServiceKeyNameDescriptionBindingTemplates

PhoneAddressEmail

Contact

businessServiceserviceKeytModelKeyNameDescriptionBindingTemplates

keyedReferencetModelKeykeyNamekeyValue

keyedReferencetModelKeykeyNamekeyValue

keyedReferencetModelKeykeyNamekeyValue

keyedReferencetModelKeykeyNamekeyValue

Business Registration

• XML document

• Created by end-user company (or on their behalf)

• Can have multiple service listings

• Can have multiple taxonomy listings

Page 16: WEB SERVICES INTRODUCTION A WEB SERVICE is an application that accepts requests from other systems across the Internet or an Intranet, mediated by lightweight,

WEB SERVICES

Example of a Registration

businessEntityTB993… Harbour Metalswww.harbourmetals.co.au“Serving Inner Sydney Harbour for …contactsbusinessServicesidentifierBagcategoryBag

872-68914281 King’s Blvd, Sydney, [email protected]

Peter Smythe

businessServiceKeyNameDescriptionBindingTemplates

businessService

23T701e54683nf…Online catalog“Website where you can …BindingTemplates

BindingTemplate5E2D412E5-44EE-…http://www.sydneynet/harbour…tModelInstanceDetails

tModelInstanceInfo

4453D6FC-223C-3ED0…

http://www.rosetta.net/catalogPIP

keyedReference

DFE-2B…DUNS45231

keyedReference

EE123…NAICS02417

tModelKeys

Page 17: WEB SERVICES INTRODUCTION A WEB SERVICE is an application that accepts requests from other systems across the Internet or an Intranet, mediated by lightweight,

WEB SERVICES

Page 18: WEB SERVICES INTRODUCTION A WEB SERVICE is an application that accepts requests from other systems across the Internet or an Intranet, mediated by lightweight,

WEB SERVICES

UDDI at Work

Harbour Metals createsonline website with local ASP

1.SydneyNet.com

Marketplaces and search enginesquery UBR, cache Harbour Metals data, and bind to its services

3. Consumers and businesses discover Harbour Metals and do business with it

4.

2.

ASP registersHarbour Metals with UBR

UDDI Registry

Page 19: WEB SERVICES INTRODUCTION A WEB SERVICE is an application that accepts requests from other systems across the Internet or an Intranet, mediated by lightweight,

WEB SERVICES

JAXR• Java APIs for XML Registries (JAXR)

• JAXR is a convenience API which provides a Java API to perform the various publishing, querying, and editing tasks these registries support.

Page 20: WEB SERVICES INTRODUCTION A WEB SERVICE is an application that accepts requests from other systems across the Internet or an Intranet, mediated by lightweight,

WEB SERVICES

WSDL (Web Services Description Language)

• For a business to discover a service it wants to use, it needs to understand the call syntax and semantics prior to actually making a call.

• WSDL is an XML document which describes the interface, semantics, and administrative info of a call to the web service

• Java API for WSDL (JWSDL) will provide an API for manipulating WSDL documents without interacting with the XML documents directly.

Page 21: WEB SERVICES INTRODUCTION A WEB SERVICE is an application that accepts requests from other systems across the Internet or an Intranet, mediated by lightweight,

WEB SERVICES

Page 22: WEB SERVICES INTRODUCTION A WEB SERVICE is an application that accepts requests from other systems across the Internet or an Intranet, mediated by lightweight,

WEB SERVICES

WSDL 1.1

• A WSDL document describes

– What the service can do

– Where it resides

– How to invoke it

• WSDL are like IDL but lot more flexible and extensible

• Defines binding for SOAP1.1, HTTP GET/POST and MIME

• WSDL descriptions can be made available from an UDDI registry

WSDL 1.1 Document StructureWSDLDocument

{Messages}

[Types]

{Services}

{PortTypes}

{Bindings}

Page 23: WEB SERVICES INTRODUCTION A WEB SERVICE is an application that accepts requests from other systems across the Internet or an Intranet, mediated by lightweight,

WEB SERVICES

Page 24: WEB SERVICES INTRODUCTION A WEB SERVICE is an application that accepts requests from other systems across the Internet or an Intranet, mediated by lightweight,

WEB SERVICES

Simple Object Access Protocol (SOAP)• After business partner looks up your WSDL description

using UDDI, it can call one or more operations on your web service using the Simple Object Access Protocol (SOAP)). – specification for performing business method requests

as XML documents

– can support a variety of lower level protocols such as HTTP(S) or SMTP

– lightweight and very easy-to-understand technology

– easy to implement

Page 25: WEB SERVICES INTRODUCTION A WEB SERVICE is an application that accepts requests from other systems across the Internet or an Intranet, mediated by lightweight,

WEB SERVICES

• SOAP specifies – how to represent various pieces of administrative info– how to encode parameters.

• A SOAP envelope surrounds the optional header and the body and is most commonly transported as an HTTP POST action to an http server, although other forms of transport (such as SMTP) are also possible.

• SOAP supports both message-passing and RPC call semantics. This is a sample SOAP call as it appears on-the-wire.

Page 26: WEB SERVICES INTRODUCTION A WEB SERVICE is an application that accepts requests from other systems across the Internet or an Intranet, mediated by lightweight,

WEB SERVICES

SOAP 1.1•XML based protocol for exchange of information

–Encoding rules for datatype instances

–Convention for representing RPC invocations

•Designed for loosely-coupled distributed computing

•Used with XML Schema

•Transport independent

•SOAP with Attachments allow arbitrary data to be packaged.

SOAP 1.1 Message StructureSOAP Envelope

[HeaderElement]

HeaderEntries

Body Element

[FaultElement]

Page 27: WEB SERVICES INTRODUCTION A WEB SERVICE is an application that accepts requests from other systems across the Internet or an Intranet, mediated by lightweight,

WEB SERVICES

• To aid developers in building XML-based requests such as SOAP requests, the Java APIs for XML based RPC (JAX/RPC) is used.

• JAX/RPC is used for sending and receiving (including marshalling and unmarshalling) method calls using XML-based protocols such as SOAP, or others such as XMLP (XML Protocol).

• JAX/RPC isolates you from the specifics of these protocols, enabling rapid application development. There is no longer any need for developers to interact directly with XML

JAX/RPC

Page 28: WEB SERVICES INTRODUCTION A WEB SERVICE is an application that accepts requests from other systems across the Internet or an Intranet, mediated by lightweight,

WEB SERVICES

JAXM (Java API for XML Messaging )

• Specification for interacting with XML messaging standards ( eg SOAP messaging , ebXML messaging)

• This allows developers to focus on interacting with the payload and not worry about the other message details.

• The difference between JAXM and JAX/RPC is analogous to the difference between message-oriented middleware (MOM) and remote procedure calls (RPCs).

Page 29: WEB SERVICES INTRODUCTION A WEB SERVICE is an application that accepts requests from other systems across the Internet or an Intranet, mediated by lightweight,

WEB SERVICES

Page 30: WEB SERVICES INTRODUCTION A WEB SERVICE is an application that accepts requests from other systems across the Internet or an Intranet, mediated by lightweight,

WEB SERVICES

Implementing Web Services • Before building web service , first challenge

– building an interface layer to • translate the incoming XML data into a format suitable for

processing by our business service• translating the results of the business service into an XML

format to return to the client. • Java API for XML Processing (JAXP)can be used

• Business layer– Once incoming XML data has been translated into Java objects, the

data is ready to be sent to an EJB business layer for processing. – EJB technology is a standard for building business components in

Java. – Using EJB components, you can gain high-end services from the

container, such as security, transactions, persistence, connection pooling, load-balancing, and failure recovery services.

Page 31: WEB SERVICES INTRODUCTION A WEB SERVICE is an application that accepts requests from other systems across the Internet or an Intranet, mediated by lightweight,

WEB SERVICES

An EJB business layer

Page 32: WEB SERVICES INTRODUCTION A WEB SERVICE is an application that accepts requests from other systems across the Internet or an Intranet, mediated by lightweight,

WEB SERVICES

Performing Back-End Integration

• Last challenge

– connecting to back-end systems, such as databases, legacy systems, and other business partners.

• Database Connectivity The JDBC API

SQL/J

• Legacy system Connectivity

Connecting to existing systems has historically been one of the most challenging and burdensome tasks of creating any enterprise deployment.

Most enterprises comprise a mix of existing systems such as SAP R/3, Siebel, i2, and custom systems. Integration has been a manual task, because there are very few adapters available for existing systems

Page 33: WEB SERVICES INTRODUCTION A WEB SERVICE is an application that accepts requests from other systems across the Internet or an Intranet, mediated by lightweight,

WEB SERVICES

• Business Partner Connectivity

The final type of back-end system that we might connect to is another business partner's web service.

This business partner system exposes itself using the same universally agreed-upon XML standards that we would use when publishing our own web service.

Namely, UDDI as a web service registry, WSDL for describing the web service, and SOAP and ebXML for performing business transactions.

Page 34: WEB SERVICES INTRODUCTION A WEB SERVICE is an application that accepts requests from other systems across the Internet or an Intranet, mediated by lightweight,

WEB SERVICES

Using the JAX* APIs to invoke a business web service

Page 35: WEB SERVICES INTRODUCTION A WEB SERVICE is an application that accepts requests from other systems across the Internet or an Intranet, mediated by lightweight,

WEB SERVICES

REFERENCES• ServerSide.com Web Site – White paper

http://www.theserverside.com/resources/article.jsp?l=WebServices-Dev-Guide

• UDDI.org

http://www.uddi.org/whitepapers.html

• Cocoon: A Framework for Web Services , Pankaj Kumar,Web Services Architect,HP Middleware


Recommended