108
Web services @ work

Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

Embed Size (px)

Citation preview

Page 1: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

Web services @ work

Page 2: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

Agenda

– Everything about web services– SOAP– WSDL– UDDI– Questions– Case Study

Page 3: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

What are Web Services ?

• Services offered over the network.

Stock Quote Service Inventory Information

Weather Service

Page 4: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

Who should create web services?

– Existing Computing Services– Existing Data storage Services– Existing Search Services– Existing Informational Services– And…..– Everybody who want to leverage existing

functionality and offer the same to whole world.

Page 5: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

Typical web services architecture

Page 6: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

Agents

Legacy System

InternetInternet

Clients

SMTP Server

Application Server (Axis)

Engine (Axis)

Service Wrapper New Service Implementation

Enabling existing services

HTTP Server (Apache, Tomcat, IIS)

Page 7: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

Who consumes web services ?

– Integrators– Support utilities– CRM Software

Page 8: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

How to create web service

• Be Guided by following standards• XML• SOAP• UDDI• HTTP (or any standard protocol)

You can turn any existing functionality into web service, by adhering to above standards

Page 9: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

Web services related Standards

– SOAP 1.2– UDDI 1.3– WSDL 1.2– HTTP 1.1

• These are set by standards body like W3C,OASIS.

Page 10: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

Major development platforms

– Microsoft’s .NET – Sun’s Web Services API– IBM’s Websphere

Page 11: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

When not to use web services

– Performance requirements– Security and reliability– No reuse requirements– Lack of Web services support– Organizational or technical alignment

Page 12: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

Simple Object Access Protocol1.2

Page 13: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

Goal

• Access objects and services on remote servers in platform independent manner

Page 14: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

AGENDA

– What is SOAP– What is NOT SOAP– Why SOAP– SOAP Message Details

Page 15: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

WSDLWSDL

WebService

SOAPSOAPServiceConsumer

Points to description

Points to service DescribesService

FindsService

Communicates withXML Messages

Web Services Technologies

UDDIRegistry

Page 16: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

What is SOAP

– Simple Object Access Protocol– Lightweight protocol for exchanging structural

information– Uses XML Technologies– Independent of any platform/technology– Simple and Extensible

Page 17: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

What is NOT SOAP

• A full-fledged distributed object system with support for

• Objects-by-reference• Activation• Message batching• Distributed garbage collection• Naming and directory services

• SOAP sacrifices these features for platform-neutrality and extensibility

Page 18: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

Typical SOAP message• <soap:Envelope

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" >• <soap:Header>• <!-- header element(s) here -->• </soap:Header>• <soap:Body>• <!-- body element(s) here -->• </soap:Body>• </soap:Envelope>

Page 19: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

Example SOAP Message• <?xml version="1.0" encoding="UTF-8"?>• <SOAP-ENV:Envelope

xmlns:xsd="http://www.w3.org/2001/XMLSchema"•

xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"• xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">• <SOAP-ENV:Body>• <ns1:echoString xmlns:ns1="http://soapinterop.org/">• <testParam xsi:type="xsd:string">Hello!</testParam>• </ns1:echoString>• </SOAP-ENV:Body>• </SOAP-ENV:Envelope>

Page 20: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

SOAP Messaging Model

SOAPSender

SOAPReceiver

Communication protocol

SOAP Message

xml

xml

Envelope

Envelope

Page 21: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

SOAP Client Server internals

Page 22: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

Typical soap request over HTTPPOST /StockQuote HTTP/1.1Host: www.stockquoteserver.comContent-Type: text/xml; charset="utf-8"Content-Length: nnnnSOAPAction: "Some-URI"

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Body> <m:GetLastTradePrice xmlns:m="Some-URI"> <symbol>DIS</symbol> </m:GetLastTradePrice> </SOAP-ENV:Body></SOAP-ENV:Envelope>

Page 23: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

Typical soap response over HTTP

HTTP/1.1 200 OKContent-Type: text/xml; charset="utf-8"Content-Length: nnnn

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> <SOAP-ENV:Body> <m:GetLastTradePriceResponse xmlns:m="Some-URI"> <Price>34.5</Price> </m:GetLastTradePriceResponse> </SOAP-ENV:Body></SOAP-ENV:Envelope>

Page 24: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

SOAP Message Structure

Page 25: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

SOAP Players

Initial SOAP

Sender

Ultimate SOAP

Receiver

SOAP

Intermediary SOAP

Intermediary

SOAP Message Path

HTTP SMTP MSMQ

Page 26: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

RPC and Document Styles

• Procedure Call • Synchronous• Marshalling and

Unmarshalling parameters between Java Objects and XML

• For simple point to point sync call

RPC

Document-drivenAsynchronous and synchronousUsed when data is large and fluid

Document

Page 27: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

RPC Style SOAP Message

• <soapenv:Envelopexmlns:soapenv="soap_ns"xmlns:xsd="xml_schema_ns"xmlns:xsi="type_ns"><soapenv:Body>

<ns1:getStockPrice xmlns:ns1="app_ns"soapenv:encodingStyle="encoding_ns"><stockSymbol xsi:type="xsd:string">

• AAPL• </stockSymbol>

</ns1:getStockPrice></soapenv:Body></soapenv:Envelope>

Page 28: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

Document Style SOAP Message

• <soapenv:Envelopexmlns:soapenv="soap_ns"xmlns:xsd="xml_schema_ns"xmlns:xsi="type_ns"><soapenv:Body><ns1:customerOrdersoapenv:encodingStyle="encoding_ns"xmlns:ns1="app_ns"><order>

<customer><name>Plastic Pens, Inc.</name><address><street>123 Yukon Drive</street><city>Phoenix</city><state>AZ</state><zip>85021</zip></address></customer><orderInfo><item><partNumber>563</partNumber><description>Red stappler</description><quantity>30</quantity><item></orderInfo>

</order></ns1:customerOrder></soapenv:Body></soapenv:Envelope>

Page 29: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

Processing SOAP Message

– SOAP HEADER Block and Node• Supports Multiple Message Exchange Patterns

– One Way– Request/Response– Peer to Peer

• Each Message is independently Processed• Roles for Node

– next– none– ultimatereceiver

Page 30: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

What happens when message arrives

1.Node determines set of roles in which it needs to act on message

2.Identify all the header blocks targeted for the Node

3.If header block is not understood, generate fault and no further processing is done.

4.Process mandatory SOAP HEADER block

5.Process BODY if Node is ultimate receiver

6.Relay message if Node is playing intermediary role.

Page 31: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

SOAP Extensibility

– SOAP Processing Model– SOAP Binding Framework

• Formal set of rules for carrying soap message over underlying protocol.

• HTTP Binding

Page 32: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

SOAP EncodingStyle– http://www.w3.org/2001/12/soap-encoding– To define data types used in the document

<?xml version="1.0"?><soap:Envelopexmlns:soap="http://www.w3.org/2001/12/soap-envelope"soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding">...Message information goes here...</soap:Envelope>

Page 33: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

SOAP RPC Representation

– Method Invocation modeled as single struct– Struct is name identical to method– Parameter has the same name and order– Method Response is also modeled as struct

Page 34: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

Data Types

• Supported• String• int/Integer• decimal• float/Float• double/Double• date• boolean/Boolean• Long/Long• Short/Short• Byte/Byte• hex

• Not Supported• BigDecimal• Other ?

Page 35: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

Where can FAULT Occur

• Client

• Server

• Protocol

Page 36: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

Example FAULT Message in HTTP

• HTTP/1.1 500 Internal Server Error• Content-Type: text/xml; charset="utf-8"• Content-Length: nnnn

• <SOAP-ENV:Envelope• xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">• <SOAP-ENV:Body>• <SOAP-ENV:Fault>• <faultcode>SOAP-ENV:Server</faultcode>• <faultstring>Server Error</faultstring>• <detail>• <e:myfaultdetails xmlns:e="Some-URI">• <message>• My application didn't work• </message>• <errorcode>• 1001• </errorcode>• </e:myfaultdetails>• </detail>• </SOAP-ENV:Fault>• </SOAP-ENV:Body>• </SOAP-ENV:Envelope>

Page 37: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

Do I have to write all that xml?

Page 38: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

Basic Web Services use SOAP

SOAPReceiver

SOAPSender

SOAPReceiver/Sender

TraderApplication

BrokerageApplication

AccountingApplication

Buy 500 shares MSFT

@$40/share

ID=Bob

Debit $20000

ID=Bob

Bought 500 shares MSFT

@$40/share

Confirm

Debit $20000

Page 39: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

SOAP-less web service?

Page 40: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

Apache SOAP Architecture

Page 41: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

SOAP : Performance

Page 42: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

SOAP - Namespaces

Page 43: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

SOAP-interoperability

• Following things must happen• The ability for the server to parse the client's SOAP

envelope. • The ability for the server to deserialize the encoded

parameter contained within the envelope • The ability for the client to parse the SOAP envelope

sent by the server in response • The ability for the client to deserialize the encoded

parameter sent back from the server.

• Main concerns• SOAP Specification follow up• Data type• Precision support for float/decimal, date time, Arrays

Page 44: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

Food for thought

– Scenario where soap intermediary is needed– How much payload of minimal SOAP Packet.– Do you really need SOAP for web services?– SOAP Over JMS?– SOAP and Performance?– SOAP slower than XML-RPC by almost 8

times !!

Page 45: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

References

• http://www.w3.org/TR/SOAP/

• http://msdn.microsoft.com/library/

• http://www.soapuser.com

• http://xml.apache.org/soap/

• http://www.xmethods.com

Page 46: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

What Next

– WS-Security– WS-Policy– WS-Trust– WS-Federation

• …….

Page 47: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

Questions

Page 48: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

WSDL

Web Services Description Language

Page 49: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

Agenda

– What is WSDL– Why WSDL– WSDL Structure– Usage– Consumers of WSDL– Questions

Page 50: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

Your business for others…

– You need grammar to describe what your business do. Grammar should address ..

• What services are offered by you• How can others invoke a service• What information your service needs• How user will provide information• What information you can provide• What format you expect

WSDL is the answer

Page 51: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

UDDIRegistry

WSDL

WebServiceSOAP

ServiceConsumer

Points to description

Points to service DescribesService

FindsService

Communicates withXML Messages

Web Services Technologies

Page 52: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

WSDL

• It is a specification to describe networked XML-based services

• WSDL is IDL of Web Services

Page 53: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

What is WSDL

• Web Services Description Language

• It is XML Document

• It is used to describe web service• Specifies location of web service• Specifies operation(s) service has to offer

• It is also used to locate web service

Page 54: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

WSDL Structure<definitions> - Root Element<definitions> - Root Element

<datatypes> - Transmitted Data Types<datatypes> - Transmitted Data Types

<messages> - Transmitted Messages

<messages> - Transmitted Messages

<portType> - Operations Supported

<portType> - Operations Supported

<binding> - Wire Protocol details<binding> - Wire Protocol details

<service> - Location of service<service> - Location of service

Page 55: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

File organization

Page 56: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

Typical WSDL File• <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl"• targetNamespace="your namespace here"• xmlns:tns="your namespace here"• xmlns:soapbind="http://schemas.xmlsoap.org/wsdl/soap">• <wsdl:types>• <xs:schema targetNamespace="your namespace here (could be another) "• xmlns:xsd="http://www.w3.org/2001/XMLSchema"• <!-- Define types and possibly elements here -->• </schema>• </wsdl:types>• <wsdl:message name="some operation input">• <!-- part(s) here -->• </wsdl:message>• <wsdl:message name="some operation output">• <!-- part(s) here -->• </wsdl:message>• <wsdl:portType name="your type name">• <!-- define operations here in terms of their messages -->• </wsdl:portType>• <wsdl:binding name="your binding name" type="tns:port type name above">• <!-- define style and transport in general and use per operation -->• </wsdl:binding>• <wsdl:service>• <!-- define a port using the above binding and a URL -->• </wsdl:service>• </wsdl:definitions>

Page 57: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

Simple WSDL File• <?xml version="1.0" encoding="UTF-8"?>• <wsdl:definitions targetNamespace="http://localhost:5000/axis/jws/QuoteOfDay.jws" xmlns="http://schemas.xmlsoap.org/wsdl/"

xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://localhost:5000/axis/jws/QuoteOfDay.jws" xmlns:intf="http://localhost:5000/axis/jws/QuoteOfDay.jws" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

• <wsdl:message name="getResponse">• <wsdl:part name="getReturn" type="xsd:string"/>• </wsdl:message>• <wsdl:message name="getRequest">• </wsdl:message>• <wsdl:portType name="QuoteOfDay">• <wsdl:operation name="get">• <wsdl:input message="impl:getRequest" name="getRequest"/>• <wsdl:output message="impl:getResponse" name="getResponse"/>• </wsdl:operation>• </wsdl:portType>• <wsdl:binding name="QuoteOfDaySoapBinding" type="impl:QuoteOfDay">• <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>• <wsdl:operation name="get">• <wsdlsoap:operation soapAction=""/>• <wsdl:input name="getRequest">• <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://DefaultNamespace" use="encoded"/>• </wsdl:input>• <wsdl:output name="getResponse">• <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://localhost:5000/axis/jws/QuoteOfDay.jws"

use="encoded"/>• </wsdl:output>• </wsdl:operation>• </wsdl:binding>• <wsdl:service name="QuoteOfDayService">• <wsdl:port binding="impl:QuoteOfDaySoapBinding" name="QuoteOfDay">• <wsdlsoap:address location="http://localhost:5000/axis/jws/QuoteOfDay.jws"/>• </wsdl:port>• </wsdl:service>• </wsdl:definitions>

Page 58: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

Message

Process ProcessMessage

Message = part1 + part2 + part3

Page 59: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

Data Types – XML SchemaSimple type Example(s) string Web Services

Boolean true, false, 1, 0

float -INF, -1E4, -0, 0, 12.78E-2, 12, INF, NaN

double -INF, -1E4, -0, 0, 12.78E-2, 12, INF, NaN

decimal -1.23, 0, 123.4, 1000.00

binary 100010

integer -126789, -1, 0, 1, 126789

nonPositiveInteger -126789, -1, 0

negativeInteger -126789, -1

long -1, 12678967543233

int -1, 126789675

short -1, 12678

byte -1, 126

nonNegativeInteger 0, 1, 126789

unsignedLong 0, 12678967543233

unsignedInt 0, 1267896754

unsignedShort 0, 12678

unsignedByte 0, 126

positiveInteger 1, 126789

date 1999-05-31

time 13:20:00.000, 13:20:00.000-05:00

Page 60: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

Schema Type Hierarchy

Page 61: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

WSDL Ports

• Describe interfaces exposed by web service• Operation Types

• One – way• Request – Response• Solicit-Response• Notification

<message name="newTermValues"> <part name="term" type="xs:string"/> <part name="value" type="xs:string"/></message><portType name="glossaryTerms"> <operation name="setTerm"> <input name="newTerm" message="newTermValues"/> </operation></portType >

<message name="getTermRequest"> <part name="term" type="xs:string"/></message><message name="getTermResponse"> <part name="value" type="xs:string"/></message><portType name="glossaryTerms">

<operation name="getTerm"> <input

message="getTermRequest"/> <output

message="getTermResponse"/> </operation>

</portType>

Page 62: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

WSDL Binding• <message name="getTermRequest">• <part name="term" type="xs:string"/>• </message>

• <message name="getTermResponse">• <part name="value" type="xs:string"/>• </message>• <portType name="glossaryTerms"> • <operation name="getTerm"> • <input message="getTermRequest"/> • <output message="getTermResponse"/> • </operation>• </portType>• <binding type="glossaryTerms" name="b1">• <soap:binding style="document"• transport="http://schemas.xmlsoap.org/soap/http" />• <operation>• <soap:operation soapAction="http://example.com/getTerm"/>• <input>• <soap:body use="literal"/>• </input>• <output>• <soap:body use="literal"/>• </output>• </operation>• </binding>

Page 63: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

WSDL Service

Page 64: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

Multiple endpoints

Page 65: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

Multiple services

Page 66: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

FAQ

Page 67: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

Food for Thought

Page 68: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

References

Page 69: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

UDDI

Universal Description, Discovery, and Integration

Page 70: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

Objective

• To Understand UDDI Framework and its usage in the webservices space.

Page 71: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

Agenda

• UDDI – Why,What,Where• Challenges and solutions• UDDI in action• UDDI Concepts• Deploying Private UDDI Registry• Case Study • Reference UDDI Implementation• Questions

Page 72: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

Prerequisites

• Web Services

• WSDL Documents

• E-Commerce Concepts

Page 73: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

UDDIRegistry

WSDL

WebServiceSOAP

ServiceConsumer

Points to description

Points to service DescribesService

FindsService

Communicates withXML Messages

Web Services Technologies

Page 74: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

Imagine ….

– Telephone without a phone directory

– Internet without search Engines

Page 75: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

UDDI

• The UDDI is to Web services what a

• search engine is to Internet data

• and Phone Directory to people.

Page 76: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

What is UDDI ?

A project to encourage interoperability and adoption of web services

WS1

WS2

WS3

WS4

Internet

Page 77: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

Challenges and SolutionsA mid-sized manufacturer needs to create 400 online relationships with customers, each with their own set of standard and protocols

BroaderB2B

A flower shop in Australia wants to be “plugged in” to every marketplace in the world, but doesn’t know how

SmarterSearch

A B2B marketplace cannot get catalog data for relevant suppliers in its industry, along with connections to shippers, insurers, etc.

Easier Aggregation

Describe Services

Discover Services

IntegrateServices

Page 78: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

UDDI In Action

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 79: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

UDDI ConceptsBasics: UDDI– Global registry hosted by UDDI Operators

– UDDI Operators (IBM, Microsoft)– Defined process for managing information– Business publish their information for free– “Registered once, Published everywhere principle”– Information is replicated = Service Cloud

Page 80: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

Business Benefits• UDDI project is not industry-specific, hence any

industry offering services can benefit.• Quickly discover the right business from millions

currently online• Reaching new customers • Expanding offerings • Extending market reach • Describing their services and business

processes programmatically in a single, open, and secure environment

Page 81: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

Information categorization in Registry

White Pages

Yellow Pages

Green Pages

Service Types

Entered by business

Entered by Standards Body

Business name, description, identifier, etc.

Business category as per std taxonomy

Technical Information about services

Page 82: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

UDDI Stack

XML Based Messaging

Network

Service Description

Service Publication

Service Discovery

Secu

rity

Man

ag

em

en

t

WSDL

SOAP

http, ftp, MQ,

IIOP, etc.

UDDI

Page 83: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

I know what you speak• Standard set of API’s available for interaction

• Inquiry API– Find things

• find_business• find_service• find_binding• find_tModel

– Get Details about things• get_businessDetail• get_serviceDetail• get_bindingDetail• get_tModelDetail

• Publishers API– Save things

• save_business• save_service• save_binding• save_tModel

– Delete things• delete_business• delete_service• delete_binding• delete_tModel

– security…• get_authToken• discard_authToken

Page 84: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

UDDI Business Registry

– What is it?– Who runs Registry?– Node Operator– Who is UDDI Registrar?– What information goes in registry?– How to search businesses in registry?– Is it free?– What kind of services can be registered?– Master Operator?

Page 85: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

UDDI Registry Interaction

Page 86: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

Example 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 87: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

UDDI & Other service/business

directories– UDDI is generic.– Stores reference to service interfaces.

• FYI, other public registries….» ebXml » Biztalk.org» OASIS xml.org

Page 88: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

UDDI - Entity Relationships

Page 89: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

tModel

• Acronym for technical Model

• tModel provide the ability to describe compliance with a specification, a concept, or a shared design.

Page 90: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

What is tModel

• tModel represents context (namespace)

1. 904-555-1212 - Phone2. 904-555-1213 - Fax3. 1-56592-391-x – ISBN

• Telephone number in UDDI

• company name: mycompany • Service name: helpline • tModel: key=11 (representing telephone line), name=telephone, • description=telephone stuff, • url: some at&t url • binding: • accesspoint: 1-800-my-helpline • tModelInstanceInfo: 11

Page 91: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

Identifier Bag• Company name: mycompany• Identifiers:• US tax number: 111111• Mexico tax number: 2223344• Some other number: 333333

• ...Other xml stuff• <identifierBag>• <keyedReference tModelKey="US-tax-code" • keyName="taxnumber" keyValue="1111111">• <keyedReference tModelKey="Mexico-tax-code" • keyName="taxnumber" keyValue="2223344">• <keyedReference tModelKey="other-stuff" • keyName="taxnumber" keyValue="333333">• </identifierBag>• ... Other xml

Example Identifiers…

• ISIN Code• TAX NUMBER• DUNS NUMBER

Page 92: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

Category Bag• Used for Taxonomy purposes

• Company name: mycompany• Applicable Categories:• Type of business classification: restaurant• city classification: Jacksonville

• <categoryBag>• <keyedReference tModelKey="BusinessTypeClassification"• keyName=“Sport" keyValue=“34343">• <keyedReference tModelKey=“RegionClasification" • keyName=“country" keyValue=“CHN">• </categoryBag>

Example

• Location• Industry• TimeZone

With categorization it is possible to convey that

I am a sports company operating in China, India and USA

Page 93: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

bindingTemplate

– Provide Technical description of a web service

– Describes an instance of web service offered at a particular network address.

– Contains following data» description» accessPoint» categoryBag» tModelInstanceDetails

Page 94: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

UDDI - Categorization

– Being able to distinguish and differentiate data is as important as being able to find data.

– Adorn UDDI Entities with property bags– Multiple classification system– Powerful search qualifiers– Metadata attributed using keyedReference

element

Page 95: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

UDDI Usage Scenarios

– Runtime Binding• Reconnect after failure with current web service

– Optimized Access Point Discovery• Connect to nearest point based on meta-data

– Data Aggregation • Pooling from identical service providers to render

collective data

– Dynamic Application configuration– Developer Reuse

Page 96: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

UDDI – Run time BindingDiscover Web Service in UDDI ManuallyDiscover Web Service in UDDI Manually

Consume Binding Template information Consume Binding Template information

Cache the bindingKeyCache the bindingKey

Use cached data when application is invokedUse cached data when application is invoked

Compare new information and reuseCompare new information and reuse

If invocation fails, use bindingkey to fetch new information

If invocation fails, use bindingkey to fetch new information

Dynamic binding worksDynamic binding works

Page 97: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

Deploying Private UDDI Registry

– Documenting Organizational UDDI Policy

– Decide on categorization– Standardizing Publications in UDDI

Services– Assigning Roles– Single/Multiple Deployment– Authentication/Authorization

Schemes

Page 98: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

Dynamic application configuration

UDDI Services provides UDDI Services provides optimal service locationoptimal service location

2.2. Provide software to all IFAs who need to Provide software to all IFAs who need to use these Web servicesuse these Web services

Web servicesWeb services

4.4. IFA client caches binding information and IFA client caches binding information and invokes services from this cacheinvokes services from this cache

3.3. At session startup, IFA client calls UDDI At session startup, IFA client calls UDDI Services for “best” services to bind toServices for “best” services to bind to

5.5. In failure scenarios, client requests new In failure scenarios, client requests new binding information from UDDI Servicesbinding information from UDDI Services

1.1. Register Independent Financial Advisor Register Independent Financial Advisor Web services in UDDI ServicesWeb services in UDDI Services

UDDI UDDI ServicesServices

Independent FinancialIndependent FinancialAdvisor client software (IFA)Advisor client software (IFA)

Page 99: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

Food For thought

• When UDDI really needed

• Do all services registered with UDDI need to be SOAP Services

• Why tModel is called that way?

• Can tModel be categorized as well?

• Try registering your business in IBM Business Registry ( http://uddi.ibm.com)

Page 100: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

UDDI Software

– Juddi– Windows 2003 server– Systinet– IBM UDDI Server

Page 101: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

References

http://www.XML.comhttp://www.UDDI.orghttp://www.w3.org/2001/sw/http://msdn.microsoft.com/soap/default.asphttp://www.w3.org/TR/SOAP/http://uddi.microsoft.com/http://www.ibm.com/uddi/

Page 102: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

Demo Registration

• Click here to view demo registration process.

Page 103: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

Case Study

• Develop Simple SOAP Services using AXIS Server

• Examine WSDL Generated• Access UDDI Server to create your services• publish your service on UDDI Server and try to

access other service which follows the agreed tmodel.

Page 104: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

Case Study …

• Find all categories supported by your UDDI Registry

• Find all identifier schemes supported by your UDDI Registry

• Find categorization groups

• How will you represent following …• Business sells medical equipment only in Germany and France and

pharmaceutical products only in the United States.

Page 105: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study
Page 106: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

Questions

rsgodbole
Page 107: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study

More to come …..

– BPEL4WS– Federation Identity Management– WS-Security, WS-Policy, WS-Trust

Page 108: Web services @ work. Agenda –Everything about web services –SOAP –WSDL –UDDI –Questions –Case Study