xml registries source: java tm api for xml registries specification

31
XML Registries Source: Java TM API for XML Registries Specification

Upload: ashlyn-nash

Post on 01-Jan-2016

279 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: XML Registries Source: Java TM API for XML Registries Specification

XML RegistriesSource: JavaTM API for XML Registries Specification

Page 2: XML Registries Source: Java TM API for XML Registries Specification

2

Outline

What is an XML Registry Overview of JAXR JAXR Implementation in JWSDP: Demo

Page 3: XML Registries Source: Java TM API for XML Registries Specification

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.

Page 4: XML Registries Source: Java TM API for XML Registries Specification

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.

Page 5: XML Registries Source: Java TM API for XML Registries Specification

5

Registry use case scenario

Page 6: XML Registries Source: Java TM API for XML Registries Specification

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

Page 7: XML Registries Source: Java TM API for XML Registries Specification

7

Existing Registry Specifications

JAXR meant to be the confluence of the various registry specifications

Page 8: XML Registries Source: Java TM API for XML Registries Specification

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)

Page 9: XML Registries Source: Java TM API for XML Registries Specification

9

JAXR API Architecture

Page 10: XML Registries Source: Java TM API for XML Registries Specification

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.

Page 11: XML Registries Source: Java TM API for XML Registries Specification

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.

Page 12: XML Registries Source: Java TM API for XML Registries Specification

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.

Page 13: XML Registries Source: Java TM API for XML Registries Specification

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.

Page 14: XML Registries Source: Java TM API for XML Registries Specification

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.

Page 15: XML Registries Source: Java TM API for XML Registries Specification

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.

Page 16: XML Registries Source: Java TM API for XML Registries Specification

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.

Page 17: XML Registries Source: Java TM API for XML Registries Specification

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

Page 18: XML Registries Source: Java TM API for XML Registries Specification

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

Page 19: XML Registries Source: Java TM API for XML Registries Specification

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.

Page 20: XML Registries Source: Java TM API for XML Registries Specification

20

Internal Classification

When a Classification instance uses a Concept within an internal ClassificationScheme then it is referred to as an internal Classification.

Page 21: XML Registries Source: Java TM API for XML Registries Specification

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.

Page 22: XML Registries Source: Java TM API for XML Registries Specification

22

Multiple Classifications

Page 23: XML Registries Source: Java TM API for XML Registries Specification

23

Object Association

An Association is defined between a new version of the NAICS ClassificationScheme and an older version of the NAICS ClassificationScheme.

Page 24: XML Registries Source: Java TM API for XML Registries Specification

24

Intramural Association

The association is between two objects that are owned by the same user that is defining the Association.

Page 25: XML Registries Source: Java TM API for XML Registries Specification

25

Extramural Association

Either or both objects that are being associated are owned by a user different from the user defining the Association.

Page 26: XML Registries Source: Java TM API for XML Registries Specification

26

Information Model Inheritance View

Page 27: XML Registries Source: Java TM API for XML Registries Specification

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

Page 28: XML Registries Source: Java TM API for XML Registries Specification

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.

Page 29: XML Registries Source: Java TM API for XML Registries Specification

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>

Page 30: XML Registries Source: Java TM API for XML Registries Specification

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

Page 31: XML Registries Source: Java TM API for XML Registries Specification

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.