Post on 01-Jan-2016
XML RegistriesSource: JavaTM API for XML Registries Specification
2
Outline
What is an XML Registry Overview of JAXR JAXR Implementation in JWSDP: Demo
3
What is a registry?
A registry is a key component in any Web Service architecture because it provides the ability to publish, discover and utilize web services.
We can think of a registry as a centralized place to store information about available web services.
4
Functionality of a registry
Registry as Electronic Yellow Pages• Providers advertise their services and consumers discover them.
Registry as a Database of Relatively Static Data• Provides a way to store relatively static information reliably and to
enable sharing of such information.
Registry as an Electronic Bulletin Board• Provide means to exchange dynamic content between parties.
5
Registry use case scenario
6
Serviceimplementation
Developer
Register information aboutthe math service
Establish
connection
and access service
Client
Registry
Check existing math services
1
23
4 5
Download service
information
Browse, Query
Specification
Metadata
XML
Registry use case scenario
7
Existing Registry Specifications
JAXR meant to be the confluence of the various registry specifications
8
A standard Java™ API for accessing diverse and heterogeneous business Registries .
A unified information model for describing business registry content
Provides multi-layered API abstractions:• Simple, high level, business API
• Flexible, low level, generic API
Enabling technology for web services and peer-to-peer computing in the J2EE™ platform
Java™ API for XML Registries (JAXR)
9
JAXR API Architecture
10
JAXR Client
The JAXR client may be any standalone Java application or a Java 2 Enterprise Edition (J2EE) enterprise component.
The JAXR client uses the JAXR API to access a registry via a JAXR provider.
11
Interface Connection
A Connection object represents a client session with a registry provider using a JAXR provider.
It maintains state information for a specific connection.
12
Interface RegistryService
Is the principal interface implemented by a JAXR provider. A registry client can get this interface from its Connection
to a JAXR provider.
13
Capability-specific Interfaces
Provide specific capabilities such as: Life cycle management Query management
Capability specific interfaces are usually named xxManager where xx represents the specific capability provided by that interface.
14
JAXR Provider
The Figure shows JAXR provider as the union of• JAXR pluggable provider, and
• Registry-specific JAXR providers. JAXR pluggable provider implements
features of the JAXR API that are independent of any specific registry type.
Is an implementation of the JAXR API. A JAXR client accesses a registry via a JAXR provider.
15
Registry Provider
Registry providers are shown as the bottom layer in the architecture .
These are implementations of various registry specifications such as ebXML and UDDI.
16
Main Interfaces Defined by the JAXR API
These are access interfaces which define how objects in the information model are submitted to the registry and subsequently managed.
17
JAXR Information Model
Describes what type of objects reside in the registry. Based upon ebXML Registry Information Model Enhanced for UDDI support Improves upon and unifies concepts from both ebXML and
UDDI
18
JAXR Information ModelGroups logically relatedRegistryObjects together
An abstract base class used by most classes. It provides minimal metadata for registry objects. It also provides methods for accessing related objects that provide additional dynamic metadata for the registry object.
RegistryObjects that provide information on organizations such as a Submitting Organization. Each Organization instance may have a reference to a parent Organization. An Organization may have a set of Service instances.
Classifies a RegistryObject instance using a classification scheme.
Defines the hierarchical tree structure and detailed elements of a classification scheme
Represents a taxonomy that may be used to classify or categorize RegistryObject instances.
s
19
Role of Concepts in Representing Taxonomy Structure
Concept instances are used to represent taxonomy elements and their structural relationship with each other in order to describe an internal taxonomy.
20
Internal Classification
When a Classification instance uses a Concept within an internal ClassificationScheme then it is referred to as an internal Classification.
21
External Classification
When a Classification instance uses a value within an external ClassificationScheme then it is referred to as an external Classification.
Here the structure of the taxonomy is not available internally to the registry and consequently there is no Concept instance.
Instead, the name and value attributes of the Classification are used to pin-point the Book Publishers taxonomy element.
22
Multiple Classifications
23
Object Association
An Association is defined between a new version of the NAICS ClassificationScheme and an older version of the NAICS ClassificationScheme.
24
Intramural Association
The association is between two objects that are owned by the same user that is defining the Association.
25
Extramural Association
Either or both objects that are being associated are owned by a user different from the user defining the Association.
26
Information Model Inheritance View
27
JAXR Implementation in JWSDP: Demo
Starting the registry server Starting Xindice database Using the Registry Browser and the Indri tool
• Adding a service (to the local registry)
• Querying the registry
• Defining our own taxonomy
28
Defining Our Own Taxonomy
JAXR provider can add user-defined taxonomies for use by JAXR clients.
The mechanisms clients use to add and administer these taxonomies are implementation-specific.
Uses a simple file-based approach to provide taxonomies to the JAXR client. These files are read at run time, when the JAXR provider starts up.
The taxonomy structure is defined by the JAXR Predefined Concepts DTD, which can be declared in a file such as jaxrconcepts.dtd or, in XML schema form, in a file such as jaxrconcepts.xsd.
29
For example, the file jaxrconcepts.xml contains the taxonomies for the implementation of JAXR in JWSDP.
The entries in the jaxrconcepts.xml file look like this:
– <PredefinedConcepts>– <JAXRClassificationScheme id="schId" name="schName">
– <JAXRConcept id="schId/conCode" name="conName" – parent="parentId" code="conCode"></JAXRConcept>– ...– </JAXRClassificationScheme>– </PredefinedConcepts>
30
To add a user-defined taxonomy, we follow these steps. • Publish the JAXRClassificationScheme element for the
taxonomy as a ClassificationScheme object in the registry that you will be accessing.
• In an XML file, define a taxonomy structure that is compliant with the JAXR Predefined Concepts DTD.
• Enter each JAXRConcept element in our taxonomy XML file by specifying the following four attributes:
– id is the JAXRClassificationScheme id value, followed by a / separator, followed by the code of the JAXRConcept element
– name is the name of the JAXRConcept element
– parent is the immediate parent id (either the ClassificationScheme id or that of the parent JAXRConcept)
– code is the JAXRConcept element code value
31
• To add the user-defined taxonomy structure to the JAXR provider, specify the system property com.sun.xml.registry.userTaxonomyFilenames when we run the client program.