JAXR - JAX Registry

Document Sample
JAXR - JAX Registry Powered By Docstoc
					03/08/2004

Agenda
? ? ? ? ? ? ? ?

JAXR
1

What is Registry? What is JAXR? JAXR Architecture Capabilities and Capability Profiles Programming APIs Information Model Demo and Lab Roadmap and Resources
5

Functionality of a Registry
?

Electronic yellow pages
–

For publication, classification and discovery of businesses, products, services, ............

?

Database of relative static and shared information
– –

What is Registry?
?

Profiles, schemas, business process description, UML models, business documents, software components “Registry to B2B” is like “database is to enterprise applications” For dynamic sharing of content Generic event notification, price changes, discounts, promotions etc

Electronic bulletin board
– –
7

6

03/08/2004

Registry Operations
? ?

How Registry Enables Web Services
?

?

To submit and store shared information To identify, name, describe, classify, relate, group, and associate shared information To query, discover and retrieve shared information

Enable publishing of web services
–

Includes technical details on how to use service Using classification, association and other metadata

?

Enable discovery web services
–

?

Facilitate B2B integration in collaborative peer-to-peer web service
–

Allow Publish and discovery of Collaboration Protocol Profile/Agreement (CPP/A) Enable publish and discovery of core components and schema 9

?

Facilitate B2B communication
–

8

Registry Use Case Scenario in B2B

Registry Use Case Scenario in B2B
?

?

?

source: JAXR specification

10

Step 1 – Seller queries registry for specifications defining a collaborative business process as well as core components that define reusable XML elements used in business documents (e.g. Address, Contact etc.) Step 3 – The Seller then registers information about their company, their products and their services in the registry Step 4 – A Buyer company may browse the registry by classifications etc. and discover the Seller 11

03/08/2004

Actors in Registry Use Case Scenario
?

Registry vs. Repository
?

Submitting Organization (SO)
–

An organization that submits or publishes content to a registry Belongs to a submitting organization and is authorized to submit content on behalf of the organization Has special access control and authorization privileges A non-privileged casual user of the registry who simply browses the data within the registry 12

Registry and registry objects
– – –

?

Content submitter
–
?

Catalog of things Uses repository internally Focus of JAXR API Holder of things Focus is on storing JAXR does not provide direct access to repository items
13

?

Registry operator
–

Repository & repository items
– – –

?

Registry guest
–

History of Registry Specification
eCo Framework

ISO 11179

UDDI Registry
?

OASIS Registry
? ?

V1.0, V2.0 developed by uddi.org, an industry consortium V3.0 is worked on through OASIS Public nodes operated by:
–

UDDI

ebXML Registry
?

IBM, Microsoft, HP, SAP, XMethods

JAXR
14

Several other implementations in open source and as products
15

03/08/2004

OASIS ebXML Registry
? ?

?

? ?

V1.0 co-developed by OASIS and UN/CEFACT V2.0 approved by OASIS Technical Committee Will become an International Standard if approved by OASIS membership in April 2002 7 Implementations including open source RI Includes a repository capability
16

What is JAXR? What is Not JAXR? Why JAXR?
17

What Is JAXR?
?

?

? ?

Standard Java™ API for performing registry operations over diverse set of registries A unified information model for describing business registry content Provides multi-layered API abstractions Enabling technology for web services in the J2EE ™ platform
18

03/08/2004

What JAXR API Is Not!
?

Why JAXR?
? ? ?

Is not a new registry standard
–

JAXR defines Java APIs for accessing various current and future registries JAXR supports a union of the best features of dominant registry specifications

?

Is not least common denominator API
–
?

? ?

Too many overlapping registry standards Industry needs standards to merge The JAXR API is the confluence of registry standards Provides a simple API for the Java™ platform, for accessing diverse registries Works with existing registry implementations Enables web services and peer-to-peer computing for the Java™ and J2EE ™ platforms
21

20

JAXR Architectural Roles
?

Registry Provider
– – –

JAXR Architecture
22

Provides an implementation of a registry specification Is not expected to implement JAXR specification examples: UDDI registry, ebXML registry Implements JAXR specification Typically functions as facade to existing registry providers example: JAXR reference implementation Uses JAXR APIs to access services provided by JAXR Provider
23

?

JAXR Provider
– – –

?

JAXR Client
–

03/08/2004

JAXR Architecture
?

RS: RegistryService interface
–

Implemented by JAXR provider Implemented by JAXR provider

?

C1, C2, .., Cn: Capability interfaces
–

25

JAXR Architecture
?

JAXR Provider Implementation
?

Remote communication occurs between JAXR provider and Registry providers
– –

Can be composed of
– –

Security concerns (over remote communication) need to be addressed Use registry provider specific protocols
? ?

JAXR pluggable provider Registry-specific JAXR provider

?

UDDI message over SOAP for UDDI registry provider ebXML MS for ebXML reg/rep

Specification does not require this implementation architecture
– –

?

JAXR client and JAXR provider are expected to be co-located in a same JVM in most implementations
26

One of many JAXR provider implementation choices Could be dealt with in the future version of JAXR

27

03/08/2004

JAXR Provider Implementation
?

JAXR pluggable provider
– –

Provides a single abstraction for multiple registryspecific JAXR providers Provides a Pluggable ConnectionFactory implementation that can create JAXR Connections using the appropriate registry-specific JAXR provider Plugs into JAXR pluggable provider Translates client request to registry provider specific request and dispatch them using registry provider specific protocol
28

?

Registry-specific JAXR provider
– –

JAXR Capability Profiles
29

JAXR Capability
?

JAXR Capability Profiles
?

Related features are grouped into a capability
– –

JAXR categorizes capabilities into a small set of capability profiles
–

Each capability is represented by a Java interface type Each feature is represented by a method of the Java interface type xxLifeCycleManager xxQueryManager
30

Capability profile is a set of capabilities Level 0 profile for basic features (Business interface) Level 1 profile for advanced features (Generic interface)
31

?

Two capability profiles defined in JAXR
– –

?

Examples
– –

03/08/2004

Level 0 Profile (Business Interface)
?

Level 1 Profile (Generic Interface)
? ? ? ? ?

Must be supported by all JAXR providers
–

Applications that use only methods defined in Level 0 profile are portable over al JAXR providers

? ? ?

Provides basic registry capabilities Interfaces are defined in JAXR Business API JAXR providers for UDDI must be level 0 compliant

Optionally supported by JAXR provider Provides advanced registry capabilities Implies support of Level 0 profile Interfaces are defined in JAXR Generic API JAXR providers for ebXML must be level 1 compliant

32

33

JAXR Provider
?

CapabilityProfile Interface
? ?

?

Must implement Capability profile in its entirety Must not implement methods beyond its declared capability profile
– –

Implemented by JAXR provider Used by JAXR client to find the capability level of a JAXR provider

Must throw UnsupportedCapabilityException when a method that is not supported is invoked Ensures portability of JAXR application

34

35

03/08/2004

JAXR Client Programming Steps
1.Create Connection object from ConnectionFactory object 2.Set up Connection properties 3.Create RegistryService object from Connection Object 4.Create xxLifeCycleManager and/or xxQueryManager object from RegistryService object 5.Perform life-cycle and query registry operations
36 37

JAXR Programming API

Connection Interface
? ?

Setting Connection Properties
?

Represents a client session with a registry provider via JAXR provider Dynamically maintains client context, state and preferences for JAXR provider
– – –

Standard JAXR Connection properties
–

Specified in JAXR specification

?

Client can set these via setter methods Client can set credentials, which will be used to authenticate the client with JAXR provider Client can set “synchronous” mode

Java WSDP implementation specific Connection properties

? ?

Created from a ConnectionFactory interface Client creates the RegistryService object for the JAXR provider from Connection object

38

39

03/08/2004

Standard JAXR Connection Properties
? ? ? ? ? ?

javax.xml.registry.queryManagerURL javax.xml.registry.lifeCycleManagerURL javax.xml.registry.semanticEquivalences javax.xml.registry.security.authenticationMethod javax.xml.registry.uddi.maxRows javax.xml.registry.postalAddressScheme

Java WSDP Implementation Specific JAXR Connection Properties
? ? ? ? ? ? ? ?

com.sun.xml.registry.http.proxyHost com.sun.xml.registry.http.proxyPort com.sun.xml.registry.https.proxyHost com.sun.xml.registry.https.proxyPort com.sun.xml.registry.http.proxyUserName com.sun.xml.registry.http.proxyPassword com.sun.xml.registry.useCache com.sun.xml.registry.useSOAP
41

40

Example: Connection
import javax.xml.registry.*; ……….. // Get an instance of ConnectionFactory object ConnectionFactory connFactory = ConnectionFactory.newInstance(); // Define connection configuration properties // Set URLs of the query service and publishing service Properties props = new Properties(); props.setProperty("javax.xml.registry.queryManagerURL", "http://uddi.ibm.com/testregistry/inquiryapi"); props.setProperty("javax.xml.registry.lifeCycleManagerURL", "https://uddi.ibm.com/testregistry/protect/publishapi");

Example: Connection
// If JAXR client goes outside firewall for query, set up HTTP proxy props.setProperty("com.sun.xml.registry.http.proxyHost", "myhost.mydomain"); props.setProperty("com.sun.xml.registry.http.proxyPort", "8080"); // If JAXR client goes outside firewall for update, set up HTTPS proxy props.setProperty("com.sun.xml.registry.https.proxyHost", "myhost.mydomain"); props.setProperty("com.sun.xml.registry.https.proxyPort", "8080"); // Set up properties and create Connection object connFactory.setProperties(props); Connection connection = connFactory.createConnection();
42 43

03/08/2004

RegistryService Interface
? ?

Example: Getting RegistryService
// Get RegistryService object RegistryService rs = connection.getRegistryService(); // Get QueryManager and LifeCycleManager objects BusinessQueryManager bqm = rs.getBusinessQueryManager(); BusinessLifeCycleManager blcm = rs.getBusinessLifeCycleManager();

?

Principal interface implemented by JAXR provider Serves as a proxy for the JAXR provider Provides access to capability specific interfaces implemented by JAXR provider
–

xxLifeCycleManager, xxQueryManager

?

Provides JAXR provider’s capability profile to JAXR clients
–

getCapabilityProfile

44

45

Capability Specific Interfaces
?

JAXR Business API (Level 0)
? ? ? ? ?

Two capability levels
– –

JAXR Business API (level 0, UDDI oriented) JAXR Generic API (level 1, ebXML reg/rep oriented) Life cycle management Query management

?

Provides specific capabilities such as
– –

?

Influenced by UDDI “Focused” API (not generic API) Obvious and simple to use Supports fewer capabilities Suitable for developing clients who need only basic registry capabilities Represented by
– –

BusinessLifeCycleManager BusinessQueryManager
47

46

03/08/2004

JAXR Generic API (Level 1)
? ? ? ? ?

Registry Operations
? ?

?

Influenced by ebXML Registry specification Generic meta-level API Very flexible Supports more capabilities Suitable for developing clients with more demanding needs Represented by
– –

Query Management Life Cycle Management

LifeCycleManager QueryManager
48 49

Query Management
?

Used to query the registry for
– –

registry entry (metadata) repository item (content) instances a Registry Browser tool an intelligent web agent (digital assistant)

?

Query Management

Used by any non-privileged registry user
– –

50

51

03/08/2004

Query Management APIs
?

Finding Organization By Name
• Use a combination of
– find qualifiers (which affect sorting and pattern

Interface QueryManager
–

super class of BusinessQueryManager and DeclarativeQueryManager provides a simple business-level API to query for the most important high-level interfaces in the information model provides a more flexible generic API to perform ad hoc queries using a declarative query language like SQL
52

?

interface BusinessQueryManager
– –

?

interface DeclarativeQueryManager
– –

matching) • Case sensitivity • Sorting method – name patterns (which specify the strings to be searched) • %<name-fragment>%

• Response is in BulkResponse Type
53

Example: Find Organizations
// Define find qualifiers. Sort by name. Collection findQualifiers = new ArrayList(); findQualifiers.add(FindQualifier.SORT_BY_NAME_DESC); // Define name patterns. Organization name begins with qString. Collection namePatterns = new ArrayList(); namePatterns.add(qString); // Find organizations using the name BulkResponse response = bqm.findOrganizations(findQualifiers, namePatterns, null, null, null, null); Collection orgs = response.getCollection();

Example: Find Organizations with %<name-fragment>%
// Define find qualifiers. Do case sensitive search. Collection findQualifiers = new ArrayList(); findQualifiers.add(FindQualifier.CASE_SENSITIVE_MATCH); // Define name patterns. Organization name contains qString. Collection namePatterns = new ArrayList(); namePatterns.add("%" + qString + "%"); // Find organizations using the name BulkResponse response = bqm.findOrganizations(findQualifiers, namePatterns, null, null, null, null); Collection orgs = response.getCollection();
54 55

03/08/2004

Steps for Finding Organization by Classification
1.Decide on classification scheme (taxonomy) 2.Build a classification within a particular classification scheme 3.Specify the classification as an argument to the findOrganizations method

Example:
// Get classification scheme. Taxonomy is NAICS. ClassificationScheme cScheme = bqm.findClassificationSchemeByName(null, "ntis-gov:naics"); // Build classifications Classification classification = blcm.createClassification(cScheme, "Snack and Nonalcoholic Beverage Bars", "722213"); Collection classifications = new ArrayList(); classifications.add(classification); // Find organizations via Classification BulkResponse response = bqm.findOrganizations(null, null, classifications, null, null, null); Collection orgs = response.getCollection();
56 57

Finding WSDL Specification Instances
? ?

Example: Finding WSDL Instances
// Get classification scheme. Taxonomy is uddi-org:types. String schemeName = "uddi-org:types"; ClassificationScheme uddiOrgTypes = bqm.findClassificationSchemeByName(null, schemeName); // Create a classification, specifying the scheme // and the taxonomy name and value defined for WSDL // documents by the UDDI specification. Classification wsdlSpecClassification = blcm.createClassification(uddiOrgTypes, "wsdlSpec", "wsdlSpec"); Collection classifications = new ArrayList(); classifications.add(wsdlSpecClassification); // Find concepts BulkResponse br = bqm.findConcepts(null, null, classifications, null, null); 59

?

?

Use classification scheme of "uddi-org:types" In JAXR, a concept is used to hold information about a WSDL specification JAXR client must find the specification concepts first, then the organizations that use those concepts Once you get organizations, you can then get services and bindingTemplates
58

03/08/2004

Example: Finding Organizations
// Display information about the concepts found Collection specConcepts = br.getCollection(); Iterator iter = specConcepts.iterator(); if (!iter.hasNext()) { System.out.println("No WSDL specification concepts found"); } else { while (iter.hasNext()) { Concept concept = (Concept) iter.next(); String name = getName(concept); Collection links = concept.getExternalLinks(); System.out.println("\nSpecification Concept:\n\tName: " + name + "\n\tKey: " + concept.getKey().getId() + "\n\tDescription: " + getDescription(concept)); if (links.size() > 0) { ExternalLink link = (ExternalLink) links.iterator().next(); System.out.println("\tURL of WSDL document: '" + link.getExternalURI() + "'"); } // Find organizations that use this concept Collection specConcepts1 = new ArrayList(); specConcepts1.add(concept); br = bqm.findOrganizations(null, null, null, specConcepts1, null, null); // Display information about organizations ... } }

Example: Finding Services and Service Bindings from Organization
Iterator orgIter = orgs.iterator(); while (orgIter.hasNext()) { Organization org = (Organization) orgIter.next(); Collection services = org.getServices(); Iterator svcIter = services.iterator(); while (svcIter.hasNext()) { Service svc = (Service) svcIter.next(); Collection serviceBindings = svc.getServiceBindings(); Iterator sbIter = serviceBindings.iterator(); while (sbIter.hasNext()) { ServiceBinding sb = (ServiceBinding) sbIter.next(); } } } 60 61

Life Cycle Management
? ?

Life Cycle Management
62

?

Create (submit), update, deprecate, and delete registry objects Used by the Submitting Organization or the publisher of registry metadata and content Privileged operations and require authentication and authorization
– –

You have to acquire some form of credential (like userid/password from each registry provider) You have to pass credential whenever you perform life cycle management operation
63

03/08/2004

Life Cycle Management APIs
?

Getting Authorization from the Registry
// Set userid/password String username = "myUserName"; String password = "myPassword"; // Create authentication object PasswordAuthentication passwdAuth = new PasswordAuthentication(username, password.toCharArray()); // Set the credential with registry provider Set creds = new HashSet(); creds.add(passwdAuth); connection.setCredentials(creds);

Interface LifeCycleManager
–

Provides complete support for all life cycle management needs using a generic API
Provides the most common life cycle management capabilities for the key business objects in the information model in an explicit API

?

Interface BusinessLifeCycleManager
–

64

65

Creating an Organization
? ? ?

Creating an Organization
// Create organization name and description Organization org = blcm.createOrganization("The Coffee Break"); InternationalString s = blcm.createInternationalString("Purveyor of " + "the finest coffees. Established 1895"); org.setDescription(s); // Create primary contact, set name User primaryContact = blcm.createUser(); PersonName pName = blcm.createPersonName("Jane Doe");primaryContact.setPersonName (pName); // Set primary contact phone number TelephoneNumber tNum = blcm.createTelephoneNumber(); tNum.setNumber("(800) 555-1212"); Collection phoneNums = new ArrayList(); phoneNums.add(tNum); primaryContact.setTelephoneNumbers(phoneNums); // Set primary contact email address EmailAddress emailAddress = blcm.createEmailAddress("jane.doe@TheCoffeeBreak.com"); Collection emailAddresses = new ArrayList(); emailAddresses.add(emailAddress); primaryContact.setEmailAddresses(emailAddresses); // Set primary contact for organization org.setPrimaryContact(primaryContact); 67

A Name object A Description object A Key object, representing the ID by which the organization is known to the registry. This key is created by the registry, not by the user, and is returned after the organization is submitted to the registry. A PrimaryContact object, which is a User object that refers to an authorized user of the registry. A User object normally includes a PersonName object and collections of TelephoneNumber, EmailAddress, and/or PostalAddress objects. A collection of Classification objects
66

?

?

?

03/08/2004

Steps of Adding Classification
1.Use BusinessQueryManager to find the taxonomy to which the organization wants to belong to 2.Create a classification using the classification scheme and a concept (a taxonomy element) within the classification scheme 3.Add the classification to the organization
68

Example: Adding Classification to Organization
// Set classification scheme to NAICS ClassificationScheme cScheme = bqm.findClassificationSchemeByName(null, "ntis-gov:naics"); // Create and add classification Classification classification = blcm.createClassification(cScheme, "Snack and Nonalcoholic Beverage Bars", "722213"); Collection classifications = new ArrayList(); classifications.add(classification); org.addClassifications(classifications);

69

Taxonomy
? ?

Represented by ClassificationScheme object JAXR provider is required to support userdefined taxonomies
– –

Taxonomy-based Registry Operation
70

Mechanisms clients use to add and administer these taxonomies are implementation-specific Java WSDP ? DTD and XML schema for taxonomy definitions are provided ? Well-known taxonomies are already defined

71

03/08/2004

JAXR Provider Must Provide Taxonomies of
?

The North American Industry Classification System (NAICS)
http://www.census.gov/epcd/www/naics.html Universal Standard Products and Services Classification (UNSPSC) – http://www.eccma.org/unspsc/ ISO 3166 country codes classification system maintained by the International Organization for Standardization (ISO) – http://www.iso.org/iso/en/prodsservices/iso3166ma/index.html
72

–

?

JAXR Information Model
74

?

JAXR API Information Model
? ?

? ?

?

?

Defines types of objects that reside in a registry and how they relate to each other Based upon ebXML Registry Information Model Enhanced for UDDI support Improves upon and unifies concepts from both ebXML and UDDI Information model does not model actual repository items java.xml.registry.infomodel package 75

JAXR API Information Model Interfaces
? ? ? ? ? ? ? ?

RegistryObject Organization Service ServiceBinding SpecificationLink ClassificationSchema Classification Concept
76

03/08/2004

JAXR Information Model Interfaces (Continued)
? ? ? ? ? ? ? ? ?

JAXR API Information Model (No, I don't expect you to read this)

Association RegistryPackage ExtenalIdentifier ExternalLink Slot ExtensibleObject AuditableEvent User PostalAddress

source: JAXR specification

77

78

Information Model Inheritance View

Object Classification
? ?

?

Multiple Classifications may be defined for each object A Classification classifies an object using a taxonomy value in a ClassificationScheme Internal vs. External Classifications

79

80

03/08/2004

Object Classification Example
? ?

Object Association
? ? ?

?

?

Arbitrary schemes Multiple classifications Hierarchical semantics Contextual classifications

Associates any two RegistryObjects Many-to-many associations supported Has a type

81

82

Intramural Association
?

Extramural Association
? ?

?

Associates objects owned by the same user Does not require confirmation

Associates objects owned by different users Requires confirmation by all users to become visible

83

84

03/08/2004

Current Status and Roadmap
? ?

Roadmap & Resources
85

1.0 specification is available RI is available now as part of Java Web Services Developer Pack (Java WSDP)
– –

Contains UDDI 2.0 compliant registry ebXML registry 2.0 available through open source

?

?

RI provides JAXR API bridge-providers that enable any UDDI and ebXML registries RI is production quality
86

Passion!
87


				
DOCUMENT INFO
Shared By:
Tags: JAXR, Registry, Java
Stats:
views:147
posted:9/19/2009
language:English
pages:21
Description: ? What is Registry? ? What is JAXR? ? JAXR Architecture ? Capabilities and Capability Profiles ? Programming APIs ? Information Model ? Demo and Lab ? Roadmap and Resources
Vinothkumar Vinothkumar Engineer
About