49
Web Service Addressing CS409 Application Services Even Semester 2007

Web Service Addressing CS409 Application Services Even Semester 2007

Embed Size (px)

Citation preview

Web Service Addressing

CS409 Application ServicesEven Semester 2007

2

What is Service Addressing?

• Ability of a service to be discovered by potential requestors.

• A process for locating service providers and retrieving service description documents that have been published.

• A central directory to host service offered by web service providers.

3

Why Addressing is Important?

• Lots of service providers and service requestors available.

• Different implementations for different services to different clients.

• Need some kind of standardization to store profile of services (registry).

4

1. Service provider registers service in a public registry directory.

2. Consumer uses the directory to find service that matched.

3. Registry provides consumer with contract and endpoint address.

4. Consumer requests service provider.

5. Service provider responds to the consumer.

Fig 1. Find-Bind-Execute Paradigm

Web Service Concept: Revisited

5

Types of Service Discovery

• Static– At application design time.– Human designer perform a find operation for a

service registry.– Result is examined and incorporated into the

application logic.– Same process is executed again next time.

6

Types of Service Discovery (2)

• Dynamic– At application run time.– Service implementation details are unbounded at

design time (e.g. network location & protocol).– Application issues find operation to locate service

implementation that match the definition at its logic.– Based on its logic, application chooses the web service

to invoke (e.g. best price, shortest delivery time, etc).– Application extracts the service implementation detail

from the chosen provider then invoke the web service.

7

What is UDDI?

• Universal Description, Discovery, and Integration.

• A specification for creating a registry service to catalog organizations and the web services they provide.

• Implementation of UDDI specification is called UDDI Registry.

8

What is UDDI? (2)

• UDDI Registry is a database that supports a set of standard data structures defined by UDDI specification.

• A registry is not a repository because it does not contain the services itself.

• Specifies protocols for:– Publishing and searching services registry.– Controlling access to registry.

9

Histories of UDDI

• September 2000, developed by Microsoft, IBM, and Ariba, then formed UDDI.org.

• Mid 2002, turned over management of UDDI.org to OASIS (Organization for the Advancement of Structured Information Standard).

• April 2003, UDDI 2.0 was approved as formal OASIS standard.

• UDDI 3.0 is still in finalization process.• 300+ companies now are joining.

10

Role of UDDI

BusinessRules

Data

Presentation

Application A

BusinessRules

Data

Presentation

Application B

Fig 2. UDDI Standpoint

UDDIRegistry

11

Role of UDDI (2)SOAP Requests

I B M

S A P

Microsoft

HewlettPackard

Others

UDDI.org

Fig 3. UDDI Business Registry

12

Who Covers the Cost?

• Right now: IBM, Microsoft, HP, and SAP.

• When version 3 is completed, transferred to independent organization.

• Planned: charge for listing, charge for value-added services, etc.

• Standard charging model still unclear…

13

How UDDI Works

• Similar like DNS.

• Businesses can register with any host sites (IBM, HP, SAP, or MSFT).

• Businesses’ information (WSDL) is placed in database at host sites.

• At regular intervals, all information are synchronized among host sites.

• Updating must be done at original host site.

14

How UDDI Works (2)

• Business wants to register must be approved by at least one host operator.

• Approval = sending authorization token to log on into UDDI site to store/update data.

• Authorization is operator exclusive.

• Business’ attributes must be validated (can be done by 3rd parties after UDDI v2).

15

Categories of UDDI

• White pages: business name & address, contact info, web site, and Data Universal Numbering System (DUNS).

• Yellow pages: type of business, geographi-cal location, products.

• Green pages: technical information such as how to interact, process definition, etc.

* All data structures is expressed using complex type in XML schemas.

16

UDDI Data Types

• Business entities: provider of the service.• Business services: collection of related services.• Service types: information necessary to use.• Technical specification: the technical and/or type

model.• Business relationships: relationship that business

entity has with another businessEntity.• Subscriptions: request to be informed of particular

changes.

17

UDDI Data Types (2)

Fig 4. UDDI Schema & Description

18

UDDI Data Types:Business Entity

Fig 5. UDDI Business Entity

19

UDDI Data Types:Business Entity

• Example:<discoveryURL useType=”businessEntity”>

http://www.doddystore.co.id?businessKey=uddi:doddystore.com:registry:sales:53</discoveryURL><businessEntity businessKey=“54438690-573E-11D8-B936-000629DC0A53”> <name xml:lang="en">DoddyStore</name> <description>UDDI Business Registry for Doddy Store</description> <contacts> <contact useType=“Technical Information”> <description xml:lang=“en”>Technical Help Desk</description> <personName>Doddy Lukito</personName> <phone useType=“Cellular Phone”>62.812.12.36339</phone> <email useType=“Work”>[email protected]</email> <address useType=“Work”> <addressLine1>Bina Nusantara University</addressLine1> <addressLine2>Hang Lekir Street</addressLine2> <cityCountry>Jakarta, Indonesia</cityCountry> </address> </contact> </contacts> . . .</businessEntity>

20

UDDI Data Types:Business Entity

• Optional Identifier Bag <identifierBag>

   <keyedReference    tModelKey=”uddi:uddi.org:ubr:identifier:dnb.com:d-u-n-s”      keyName=”SAP AG”

keyValue=”31-626-8655” />

</identifierBag>

• Optional Category Bag <categoryBag>

   <keyedReference    tModelKey=”uddi:uddi.org:ubr:categorization:iso3166”    keyName=”California, USA”

    keyValue=”US-CA” />

</categoryBag>

21

UDDI Data Types:Business Service

Fig 6. UDDI Business Service

22

UDDI Data Types:Business Service

• Uniquely identified by optional serviceKey attribute.– Supplied by UDDI if not supplied by publisher.

• Optional descriptions.

• Optional categorizations in categoryBag.

• One or more bindingTemplates.

• Optional digital signature.

23

UDDI Data Types:Business Service

• Example:<businessEntity>

...

<businessServices>

<businessService serviceKey=“4C379407-3e1e-DC97-B1C7-F68597DA4ADB”

businessKey=“54438690-573E-11D8-B936-000629DC0A53”>

<name>Purchase Order Submission</name>

<description>Doddy Store Purchase Order Submission Service</description>

...

</businessServices>

<businessServices>

...

</businessServices>

...

<businessEntity>

24

UDDI Data Types:Service Types

Fig 7. UDDI Service Types

25

UDDI Data Types:Service Types

• Uniquely identified by optional bindingKey attribute.

• Optional serviceKey identifies service that contains this bindingTemplate.

• Descriptions.• accessPoint - network address (URL)• hostingRedirector – optional• categoryBag – optional• tModelInstanceDetails - detail of technical/type

model in the particular service types.

26

UDDI Data Types:Service Types

Fig 8. tModelInstance Detail

27

UDDI Data Types:Service Types

Fig 9. Overview document

28

UDDI Data Types:Service Types

• Example:<businessEntity>

...

<businessServices>

...

<bindingTemplates>

<bindingTemplate bindingKey=“2E6BAE12-04E3-DBC2-90DB-A96E21406F79”

serviceKey=“4C379407-3E1E-DC97-B1C7-F68597-F68597DA4ADB”>

<description>Web Based Purchase Order Service</description>

<accessPoint URLType=“http”>www.doddystore.com/SubmitPO.html</accessPoint>

</bindingTemplates>

<bindingTemplates>

<bindingTemplate bindingKey=“3F7ABC88-14F2-AEF2-41AE-F86E52908A11”

serviceKey=“4C379407-3E1E-DC97-B1C7-F68597-F68597DA4ADB”>

<description>SOAP Based Purchase Order Service</description>

<accessPoint URLType=“http”>www.doddystore.com/SubmitPO.html</accessPoint>

</bindingTemplates>

</businessServices>

<businessEntity>

29

UDDI Data Types:Technical Specification

• Technical Specification (tModel)• Reflects the technical and/or type model.• Used to categorize or identify web services and

their organization so they can be located easily using queries.

• Reference the location of the WSDL document that contain the technical specification for a particular service.

30

UDDI Data Types:Technical Specification

Fig 10. tModel Structure

31

• Example:<businessEntity>

...

<businessServices>

...

<bindingTemplates>

<bindingTemplate> . . .

<description> . . .</description>

<accessPoint >. . .</accessPoint>

<tModelInstanceDetails>

<tModelInstanceInfo tModelKey=“uuid:68DE9E80-AD09-469D-8A37-088422BFBC36D”>

<description>HTTP address</description>

<tModelInstanceInfo>

</tModelInstanceDetails>

</bindingTemplates>

</businessServices>

<businessEntity>

UDDI Data Types:Technical Specification

32

UDDI Data Types: Business Relationship

• publisherAssertion:– To link together two or more businesses that

are related to each other.– Could be to subsidiary or larger enterprise.

• Example:<publisherAssertion>

<fromKey>76CA56B2-789A-1AE8-95239FBC235E</fromKey>

<toKey>ACFA56B2-789A-1AE8-95239FB644D</toKey>

<keyedReference keyName=“subsidiary”

keyValue=“parent-child”

tModelKey=“uuid:807A2C6A-EE22-470D-ADC7-E0424A337C03”

</keyedReference>

</publisherAssertion>

33

Using UDDI

• Categories of APIs in UDDI specification Inquiry: to find a service in a public registry. Publication: to publish a service in a public registry. Subscription: to get notified by provider if something has

changed. Security: to impose security protection of the XML. Custody Transfer. Replication.

34

Using UDDI (2)

• Inquiry API functions:• find_binding• find_business• find_relatedBusinesses• find_service• find_tModel

• get_bindingDetail• get_businessDetail• get_operationalInfo• get_serviceDetail• get_tModelDetail

35

Using UDDI (3)

• Sample SOAP message for inquiry:

<find_business xmlns=“urn:uddi-org:api_v3”> <findQualifiers> <findQualifier> uddi:uddi.org:findQualifiers:exactMatch </findQualifier> </findQualifiers> <name> XMLTC Consulting Inc. </name></find_business>

36

Using UDDI (4)

• Sample message for combined search:<find_business xmlns="urn:uddi-org:api_v3"> <findQualifiers> <findQualifier>uddi:uddi.org:findqualifier:sortbynameasc</findQualifier>

   <findQualifier> uddi:uddi.org:sortorder:uts-10</findQualifier>   <findQualifier>uddi:uddi.org:findqualifier:orallkeys</findQualifier>

</findQualifiers>

  <!--find businesses that have bindings that reference this fixed tModel --> <tModelBag>

<tModelKey>uddi:some.specific.example:tmodelkey</tModelKey></tModelBag><find_tModel xmlns="urn:uddi-org:api_v3"> <findQualifiers>    <findQualifier>uddi:uddi.org:findqualifier:approximatematch</findQualifier>      <findQualifier>uddi:uddi.org:findqualifier:caseinsensitivematch</findQualifier>      <findQualifier>uddi:uddi.org:sortorder:uts-10</findQualifier>   </findQualifiers>   <name>Find Information</name></find_tModel>

</find_business>

37

Using UDDI (5)

• Publication APIs:• save_binding.• save_business.• save_service.• save_tModel.• Delete_xx.• Xx_publisherAssertions.

38

Using UDDI (6)

• Sample SOAP message for publishing:<save_business generic=“2.0” xmlns=“urn:uddi-org:api_v2”>

<authInfo>Doddy Lukito</authInfo>

<businessEntity businessKey=“54438690-573E-11D8-B936-000629DC0A53”>

<name>Doddy Store</name>

<description>UDDI Business Entity for Doddy Store</description>

<contacts> ... </contacts>

<identifierBag>

<keyedReference keyname=“DUNS”

keyValue=“00-111-1111”

tModelKey=“uuid:8609C81E-EE1F-4D5A-B202-3EB13AD01823” />

</identifierBag>

<categoryBag>

<keyedReference keyname=“Doddy eBusiness Store”

keyValue=“33992”

tModelKey=“uuid:C0B9FE13-EE1F-4D5A-B202-3EB13AD01823” />

</categoryBag>

</businessEntity>

</save_business>

39

Registry Implementation

• Public registry– Global directory of international business

service descriptions.– Hosted by node operators on a series of

dedicated UDDI servers for commercial use.– Registry records are synchronized

automatically between repositories.– Example: UBR (UDDI Business Registry) by

IBM, MSFT, NTT, SAP under IBR Operators Council.

40

Registry Implementation (2)

• Private registry (internal registry):– Service description repositories hosted within

an organization.– Access restricted to internal users or selected

external business partners.– Example: ISEC (Integrated Shipbuilding

Environment Consortium) by NIIP to provide partner network for US shipbuilders.

41

Registry Implementation (3)

Fig 11. Searching for service at uddi.microsoft.com

42

Registry Implementation (4)

Fig 11. Publishing service at uddi.microsoft.com

43

Mapping WSDL to UDDI

Fig 11. Comparison of WSDL and UDDI

44

Mapping WSDL to UDDI (2)

WSDL:portType UDDI:tModel

WSDL UDDI

portType tModel (categorized as portType)

Namespace of portType keyedReference in categoryBag

Local name of portType tModel Name

Location of WSDL Document overviewURL

45

Mapping WSDL to UDDI (3)

WSDL binding UDDI:tModel

WSDL UDDI

binding tModel (categorized as binding and wsdlSpec)

Namespace of binding keyedReference in categoryBag

Local name of binding tModel Name

Location of WSDL Document overviewURL

portType reference and protocol references

keyedReferences in category bag

46

Mapping WSDL to UDDI (4)

WSDL service UDDI business service

WSDL UDDI

Service businessService (categorized as service)

Namespace of Service keyedReference in categoryBag

Local Name of Service keyedReference in categoryBag; optionally also the name of the service

47

Mapping WSDL to UDDI (5)

WSDL port UDDI bindingTemplateWSDL UDDI

Namespace Captured in keyedReference of the containing businessService

Local name of port instanceParms of the tModelInstanceInfo relating to the tModel for the binding

Binding implemented by port tModelInstanceInfo with tModelKey of the tModel corresponding to the binding

portType implemented by port tModelInstanceInfo with tModelKey of the tModel corresponding to the portType 

48

Latest Development

• There are other standards found and manage by other organizations.

• The basis is still XML and SOAP.

• For example:– ebXML Registry 3.0.– Sun Service Registry.– etc …