Service-Oriented Computing
Registering and Discovering
Web services
Service Registry
• To discover Web services, a service registry is needed. This requires describing and registering the Web service.
• Publication of a service requires proper description of a Web service in terms of
Business, Service, and Technical information.
• Registration deals with persistently storing the Web service descriptions in the Web services registry.
E-service provider
(2) Query for all registry (3) Discovery results (4) Request for selected service information (1) Registration request for service description
(6) Invocation request including possible inputs
INVOKE SEARCH PUBLISH Service Registry Service provider
Service requester (7) Invocation results
(5) Service information of selected service
E-service provider
matching services in (2) Query for all
registry matching services in the
(2) Query for all registry (3) Discovery results (3) Discovery results (4) Request for selected service information (4) Request for selected service information (1) Registration request for service description (1) Registration request for service description
(6) Invocation request including possible inputs
(6) Invocation request including possible inputs
INVOKE SEARCH PUBLISH Service Registry Service registry
Service providerService provider
Service requesterServicerequestor (7) Invocation results
Service Discovery
• Service discovery is the process of locating Web service providers, and retrieving Web services descriptions that have been previously published.
• Interrogating services involve querying the service registry for Web services matching the needs of a service requestor.
– A query consists of search criteria such as:
the type of the desired service, preferred price and maximum number
of returned results, and is executed against service information published by service provider.
Types of service discovery
Static
• The service implementation details are bound at design time and a service retrieval is performed on a service registry.
• The results of the retrieval operation are examined usually by a human designer and the service description returned by the retrieval operation is incorporated into the application logic.
Dynamic
• The service implementation details are left unbound at design time so that they can be determined at run-time.
• The Web service requestor has to specify preferences to enable the application to infer/reason which Web service(s) the requester is most likely to want to invoke.
What is UDDI?
•
Universal Description, Discovery and Integration
(
UDDI
,
pronounced
Yu-di)
is
a platform-independent,
Extensible Markup Language (XML)-based registry by which
businesses worldwide can list themselves on the Internet, and
a mechanism to register and locate web service applications.
– roughly equivalent to “phone directory” of web services
• UDDI enables a business to:
– describe its business and its services;
6
What UDDI Does
Provides a registry (database) that contains information
about
– Business entities
– Services provided by those entities
– Categorization information that can be used for searches to find businesses and services
– WSDL description of those services
Provides an interface (query and update language) for
7
UDDI addresses a number of business problems
– Help broaden and simplify business-to-business (B2B) interaction
by allowing efficient, simple and automatic discovery of business and services
Discovery of service can be done automatically without human
intervention
– Allows dynamic integration of relevant Web services into an
aggregate business process
Hence enable one-stop shopping for information on
businesses and electronic services
UDDI Evolution
UDDI 1.0 was originally announced by Microsoft, IBM and
Ariba in September 2000
In May 2001, Microsoft and IBM launched the first UDDI
operator sites
UDDI 2.0 was announced in June 2001
Approved by the
Organization for the Advancement of
Structured Information Standards (OASIS)
as a formal
standard in April 2003
Current Status:
UDDI 3.0.2 has been released in Oct 2004
OASIS UDDI Specifications Technical Committee manages and
Consist of two parts:
– A technical specification for building a distributed directory of businesses and web services,
– UDDI Business Registry (UBR) was an operational implementation of the UDDI specification as a web service(stopped in Jan 2006).
The UDDI Business Registry (UBR) is a global implementation of the UDDI specification. The UBR is a single registry for Web services. A group of companies operate and host UBR nodes, each of which is an identical copy of all other nodes. New entries or updates are entered into a single node, but are propagated to all other nodes.
• The data captured within UDDI (A UDDI Business Registry) is divided into three categories:
“white pages”
Contain general info about a specific company.
e.g. Business name, business description, contact info, address and phone numbers.
“yellow pages”
Extend the ability to locate a business or service,
Support classification using various taxonomy systems for categorization.
“green pages”
Provide information on how and where to programmatically invoke a service,
Contain technical info about a Web services,
Provide address for invoking service,
Can provide references to a Web page, email address or services using other component technologies, CORBA, RMI, etc.
UDDI Technical Overview
The UDDI technical architecture consists of three parts:
–
UDDI data model:
An XML Schema (rules) for describing businesses and Web
services.
–
UDDI API:
A SOAP-based API for searching and publishing UDDI data.
–
UDDI cloud services (stopped in Jan 2006):
UDDI Data Model
• The UDDI XML schema defines four core types of information:
–
businessEntity:
a description of the organization that provides the service.
About the actual business, e.g. business name, etc.
White page
–
businessService:
a list of all the Web services offered by the business entity.
About the services provided by the business.
Yellow page.
–
bindingTemplate:
Technical information necessary to access a service.
About how and where to access a specific service.
Green page.
–
tModel (Technical Model):
Descriptions and pointers to a reusable concept, external technical
specifications or taxonomies.
E.g., Web service type, a protocol used by Web services, a
14 UDDI Business Registry
<Business>
<businessEntity> :
:
</businessEntity> </Business>
<Service>
<businessService> <bindingTemplate> :
:
</bindingTemplate> </businessService> </Service>
<TModel> <tModel> : :
</tModel> </TModel>
15
A. businessEntity
<businessEntity businessKey=
“ba744ed0-3aaf-11d5-80dc-002035229c64”> <name> XMethods </name>
<description> … </description> <contacts>
<contact> … </contact> <contact> … </contact> </contacts>
<identifierBag> … </identifierBag> <categoryBag> … </categoryBag>
</businessEntity>
<businessEntity businessKey=
“ba744ed0-3aaf-11d5-80dc-002035229c64”> <name> XMethods </name>
<description> … </description> <contacts>
<contact> … </contact> <contact> … </contact> </contacts>
<identifierBag> … </identifierBag> <categoryBag> … </categoryBag>
</businessEntity>
Typical contents of businessEntity
16
businessEntity
element includes info about the actual
business
– Business name, description, contact info such as address, phone,
contact person, etc.
Each business will receive a unique
businessKey
value
when registration to a UDDI server
– e.g. businessKey of Microsoft in its UDDI server:
0076b468-eb27-42e5-ac09-9955cff462a3
The key is used to tie a business to its published
services
specifies a
categoryBag
element to categorize the
17
Can also include other unique value(s) in
identifierBag
that
identifies the company
– UDDI supports Dun & Bradstreet D-U-N-S® Numbers and Thomas
Registry Supplier IDs
– e.g. Microsoft’s Dun & Bradstreet D-U-N-S® No: 08-146-6849
Businesses can also register multiple
business categories
in categoryBag based on standard taxonomies, e.g.
– NAICS: The North American Industry Classification System provides
industry classification
– UNSPSC: Universal Standard Products and Service Classification provides
product and service classification
Dun & Bradstreet (D&B) provides a D-U-N-S Number, a unique nine digit identification number, for each physical location of your business.
D-U-N-S Number assignment is FREE for all businesses required to register with the US Federal government for contracts or grants.
18
<identifierBag> <keyedReference tModelKey=
“uuid:8609c81e-ee1f-4d5a-b202-3eb13ad01823” keyName=“D-U-N-S” keyValue=“08-146-6849” /> </identifierBag>
<categoryBag> <keyedReference tModelKey=
“uuid:c0b9fe13-179f-413d-8a5b-5004db8e5bb2” keyName=“NAICS: Software Publisher”
keyValue=“51121” /> </categoryBag> <identifierBag> <keyedReference tModelKey= “uuid:8609c81e-ee1f-4d5a-b202-3eb13ad01823” keyName=“D-U-N-S” keyValue=“08-146-6849” /> </identifierBag>
<categoryBag> <keyedReference tModelKey=
“uuid:c0b9fe13-179f-413d-8a5b-5004db8e5bb2” keyName=“NAICS: Software Publisher”
keyValue=“51121” /> </categoryBag>
20
B. businessService
<businessService serviceKey= “d5921160-3e16-11d5-98bf-002035229c64” businessKey= “ba744ed0-3aaf-11d5-80dc-002035229c64”> <name>XMethods Delayed Stock Quotes</name> <description> … </description><bindingTemplates> <bindingTemplate> : </bindingTemplate> </bindingTemplates> </businessService> <businessService serviceKey= “d5921160-3e16-11d5-98bf-002035229c64” businessKey= “ba744ed0-3aaf-11d5-80dc-002035229c64”> <name>XMethods Delayed Stock Quotes</name> <description> … </description>
<bindingTemplates> <bindingTemplate> : </bindingTemplate> </bindingTemplates> </businessService>
Typical contents of
businessService element To tie the service with the business
21
businessService
element includes info about a single
web service or a group of related Web services
Include the name, description and an optional list of
bindingTemplates
Like businessEnitity, each businessService has a
unique
service key
Should specify the
businessKey
to relate with the
business that provides that service
22
C. bindingTemplate
<bindingTemplate
serviceKey=“d5921160-3e16-11d5-98bf-002035229c64” bindingKey=“…”> <description xml:lang=“en”> : </description> <accessPoint URLType=“http”> http://services.xmethods.net:80/soap </accessPoint> <tModelInstanceDetails> : </tModelInstanceDetails> </bindingTemplate> <bindingTemplate
serviceKey=“d5921160-3e16-11d5-98bf-002035229c64”
bindingKey=“…”> <description xml:lang=“en”> : </description> <accessPoint URLType=“http”> http://services.xmethods.net:80/soap </accessPoint> <tModelInstanceDetails> : </tModelInstanceDetails> </bindingTemplate>
Typical contents of
23
bindingTemplate
element includes info about how and
where to access a specific web service
e.g. The Stock Quote Service is available via SOAP at
http://services.xmethods.net:80/soap
The
serviceKey
ties the bindingTemplate with the
businessService “the Stock Quote Service”
tModelInstanceDetails
should further specify the key of
the tModel used in this service
<tModelInstanceDetails> <tModelInstanceInfo tModelKey=
“uuid:0e727db0-3e14-11d5-98bf-002035229c64”/> </tModelInstanceDetails>
<tModelInstanceDetails> <tModelInstanceInfo tModelKey=
“uuid:0e727db0-3e14-11d5-98bf-002035229c64”/> </tModelInstanceDetails>
24
D. tModel
tModels
are primarily used to provide pointers to external
technical specifications
bindingTemplate only provides info about where to access
the SOAP binding, but not how to interface with it
tModel element fills this gap by
providing a pointer to an
external specification
, such as WSDL
In fact, tModels are not reserved to Web services only
tModels are used whenever it is necessary to point to any
external specification, such as the D-U-N-S® no.
25 <tModel tModelKey= “uuid:0e727db0-3e14-11d5-98bf-002035229c64” …> <description xml:lang=“en”>
Simple stock quote interface </description>
<overviewDoc>
<description xml:lang=“en”>wsdl link </description> <overviewURL> http://www.xmethods.net/tmodels/ SimpleStockQuote.wsdl </overviewURL> </overviewDoc> <tModel tModelKey= “uuid:0e727db0-3e14-11d5-98bf-002035229c64” …> <description xml:lang=“en”>
Simple stock quote interface </description>
<overviewDoc>
<description xml:lang=“en”>wsdl link </description> <overviewURL> http://www.xmethods.net/tmodels/ SimpleStockQuote.wsdl </overviewURL> </overviewDoc>
Same as that listed in bindingTemplate
A pointer points to the actual WSDL file
26
<categoryBag>
<keyedReference tModelKey=
“uuid:c1acf26d-9672-4404-9d70-39b756e62ab4” keyName=“uddi-org:types”
keyValue=“wsdlSpec” /> </categoryBag>
</tModel>
<categoryBag>
<keyedReference tModelKey=
“uuid:c1acf26d-9672-4404-9d70-39b756e62ab4” keyName=“uddi-org:types”
keyValue=“wsdlSpec” /> </categoryBag>
</tModel>
Define the category of this tModel
Categorization scheme: uddi-org:types Category: wsdlSpec
28
UDDI API
There are two ways to search or publish a business/service
– Using the Web pages provided by the UDDI implementation (UDDI
cloud service), such as uddi.microsoft.com
Need human intervention
– Using the APIs provided by UDDI
Can be made automatic by calling the APIs with computer programs
UDDI APIs
can be divided into two parts:
– Inquiry APIs – Publishing APIs
– The Inquiry API set is used to locate and obtain details on
entries in the UDDI registry. For example to find out endpoint of given web service.
– The publication API set is used to publish and update
29
Inquiry Operations: Publishing Operations:
Find Save
find_business save_business
find_service save_service
find_binding save_binding
find_tModel save_tModel
Get details Delete
get_businessDetail delete_business
get_serviceDetail delete_service
get_bindingDetail delete_binding
get_tModelDetail delete_tModel
get_registeredInfo
get_registeredInfo Security
get_authToken, discard_authToken
Inquiry Operations: Publishing Operations:
Find Save
find_business save_business
find_service save_service
find_binding save_binding
find_tModel save_tModel
Get details Delete
get_businessDetail delete_business get_serviceDetail delete_service get_bindingDetail delete_binding get_tModelDetail delete_tModel get_registeredInfo
get_registeredInfo Security
get_authToken, discard_authToken Examples of Inquiry and
30
Registry UDDI SOAP
Request
UDDI SOAP Response
UDDI Client UDDI Registry Node
HTTP Server
SOAP Server
Process UDDI API request
Wrapped by SOAP envelope and sent thru HTTP
31 <envelope xmlns= “http://schemas.xmlsoap.org/soap/envelope/”> <body> <find_business generic=“1.0” xmlns=“urn:uddi-org:api”> <name>XMethods</name> </find_business> </body> </envelope> <envelope xmlns= “http://schemas.xmlsoap.org/soap/envelope/”> <body>
<find_business generic=“1.0” xmlns=“urn:uddi-org:api”> <name>XMethods</name>
</find_business> </body>
</envelope>
Example: find_business
Wrapped by a SOAP envelope
UDDI API find-business
Default namespace Based on SOAP 1.1
Using UDDI 1.0
32 <envelope xmlns= “http://schemas.xmlsoap.org/soap/envelope/”> <body> <businessList generic=“1.0” operator=“Microsoft Corporation” truncated=“false” xmlns=“urn:uddi-org:api”> <businessInfos> <businessInfo businessKey= “ba744ed0-3aaf-11d5-80dc-002035229c64”> <name>XMethods</name>
<description> … </description> <serviceInfos>
<serviceInfo> … </serviceInfo> </serviceInfos> </businessInfo> </businessInfos> </businessList> </body> </envelope> <envelope xmlns= “http://schemas.xmlsoap.org/soap/envelope/”> <body>
<businessList generic=“1.0”
operator=“Microsoft Corporation” truncated=“false” xmlns=“urn:uddi-org:api”> <businessInfos> <businessInfo businessKey= “ba744ed0-3aaf-11d5-80dc-002035229c64”> <name>XMethods</name>
<description> … </description> <serviceInfos>
<serviceInfo> … </serviceInfo> </serviceInfos>
</businessInfo> </businessInfos> </businessList> </body>
</envelope> Response from Microsoft UDDI Registry
Indicate the service(s) provided by XMethod
33
Example: get_businessDetail
<envelope xmlns= “http://schemas.xmlsoap.org/soap/envelope/”> <body> <get_businessDetail generic=“1.0” xmlns=“urn:uddi-org:api”> <businessKey> ba744ed0-3aaf-11d5-80dc-002035229c64 </businessKey> </get_businessDetail> </body> </envelope> <envelope xmlns= “http://schemas.xmlsoap.org/soap/envelope/”> <body><get_businessDetail generic=“1.0” xmlns=“urn:uddi-org:api”> <businessKey> ba744ed0-3aaf-11d5-80dc-002035229c64 </businessKey> </get_businessDetail> </body> </envelope>
34 <envelope xmlns= “http://schemas.xmlsoap.org/soap/envelope/”> <body> <businessDetail generic=“1.0” operator=“Microsoft Corporation” truncated=“false” xmlns=“urn:uddi-org:api”> <businessEntity businessKey=
“ba744ed0-3aaf-11d5-80dc-002035229c64”> <name>XMethods</name>
<description> … </description> <contacts>
<contact> … </contact> </contacts> <businessServices> : </businessServices> </businessEntity> </businessDetail> </body> </envelope> <envelope xmlns= “http://schemas.xmlsoap.org/soap/envelope/”> <body>
<businessDetail generic=“1.0”
operator=“Microsoft Corporation”
truncated=“false” xmlns=“urn:uddi-org:api”> <businessEntity businessKey=
“ba744ed0-3aaf-11d5-80dc-002035229c64”> <name>XMethods</name>
<description> … </description> <contacts>
<contact> … </contact> </contacts> <businessServices> : </businessServices> </businessEntity> </businessDetail> </body> </envelope>
Response from Microsoft UDDI Registry Return a businessEntity record
35
An example of Publication, Inquiry and Invocation
Process
UDDI Registry
Company ABC
ABC
Business ABCService
ABC tModel
Publication
36
The objective of
publishing business
is to allow the
clients to know the details of the business
– such as the name of the company, the contact person, address
and phone number etc.
By
publishing the service
, the clients would know where
and how to contact the service provider
– such as the access point (or URL) of the service, transport
protocol used (HTTP, FTP or else)
Publishing the tModel
allows the clients to invoke the
service provided by the business
– based on the WSDL document of the service
37
Step 2
UDDI RegistryCompany XYZ
find_business (ABC)
ABC’s
businessKey = ba744ed0-3aaf-11d5-80dc-002035229c64
serviceKey = d5921160-3e16-11d5-98bf-002035229c64
38
Step 3
UDDI RegistryCompany XYZ
get_serviceDetail (ABC’s serviceKey)
ABC’s service
accessPoint = http://services.xmethods.net:80/soap
tModelKey = uuid:0e727db0-3e14-11d5-98bf-002035229c64
39
Step 4
UDDI RegistryCompany XYZ
get_tModelDetail (tModelKey)
tModel’s
overviewURL =
http://www.xmethods.net/tmodels/SimpleStockQuote.wsdl
40
Step 4
Step 5
Company XYZ
GLUE’s wsdl2java or IBM’s wsdlreader
(access point and
http://www.xmethods.net/tmodels/SimpleSt ockQuote.wsdl)
Company ABC
WSDL document
Helper files
GLUE approach
41
Step 4
Step 6
Company XYZ
Based on the helper files, invoke the service
Company ABC
Result
42
UDDI Toolkits
Similar to SOAP, there are many development platforms of UDDI that help to
hide away the difficulty of directly programming in XML
Earlier one: UDDI for Java (UDDI4J)
– A Java client toolkit developed by IBM for retrieving and publishing UDDI
data
WebSphere also provides a UDDI registry along with its WebSphere Application
Server Network Deployment version 5.1
Implement full set of UDDI APIs to facilitate the publish and inquiry of
Using UDDI
UDDI can be used in at least three different scenarios:
– Public – this consists of a collection of replicating UDDI servers hosted by Microsoft, IBM and HP:
Anyone can obtain an account and perform inquiry and publish
operations.
Companies who wish to publish general-purpose Web Services
uses this public Internet UDDI system.
– Protected – some industry consortiums might wish to maintain their own UDDI servers that are specific to their industry, for performance or security reasons:
If desired, these servers can be set up to replicate their content up
Using UDDI
– Private – companies may choose to run internal UDDI servers to catalogue their internal Web Services:
For example, a large manufacturing company could use a private
UDDI server to publish all of its individual manufacturing services for use by its in-house applications.
If desired, the private UDDI server can be set up to replicate some
WSDL to UDDI Mapping Model
• The
service
description
in
WSDL
documents
is
complementary
to the information found in UDDI business
and service entries. These two constructs are quite
complementarily work together naturally.
– UDDI and WSDL distinguish clearly between interface and implementation.
Public Registries
IBM
Public registry
– Registration: https://uddi.ibm.com/ubr/registry.html – inquiryURL= https://uddi.ibm.com/ubr/inquiryapi – publishURL= https://uddi.ibm.com/ubr/publishapi
Test registry
Public Registries
HP
– Registration: http://uddi.hp.com
– inquiryURL = http://uddi.hp.com/ubr/inquire – publishURL = https://uddi.hp.com/ubr/publish
Microsoft
– Registration: http://uddi.rte.microsoft.com
– inquiryURL=http://uddi.rte.microsoft.com/inquire – publishURL=https://uddi.rte.microsoft.com/publish
SAP
– Registration: http://udditest.sap.com