developer.com
Search EarthWeb
CodeGuru | Gamelan | Jars | Wireless | Discussions
Navigate developer.com
Architecture & Design  
Database  
Java
Languages & Tools
Microsoft & .NET
Open Source  
Project Management  
Security  
Techniques  
Voice  
Web Services  
Wireless/Mobile
XML  
Technology Jobs  

   Developer.com Webcasts:
  The Impact of Coding Standards and Code Reviews

  Project Management for the Developer

  Defining Your Own Software Development Methodology

  more Webcasts...




See the Winners!


Developer Jobs

Be a Commerce Partner
Computer Hardware
Remote Online Backup
Compare Prices
Televisions
Promos and Premiums
Online Education
Laptops
GPS Devices
Baby Photo Contest
Find Software
Condos For Sale
KVM Switches
Auto Insurance Quote
Best Price

 
Biz Resources
Network Security Services
VoIP
CRM Software


Developer News -
SaaS Tool Offers Custom Database Development    May 9, 2008
Microsoft’s Automated Agent: Can We Talk?    May 7, 2008
Borland Finally Sells CodeGear    May 7, 2008
Red Hat Heads For The JON 2.0    May 7, 2008
Free Tech Newsletter -

Best Practices for Developing a Web Site: Checklists, Tips, Strategies & More. Download Exclusive eBook Now.

UDDI V3 Subscriptions, Part II
By Arulazi Dhesiaseelan

Introduction

Universal Description, Discovery, and Integration (UDDI) technology is becoming the lingua franca for Web services publishing and discovery mechanisms. UDDI V2 specifications have been promoted as OASIS standards. UDDI V3 specifications are UDDI Spec TC Committee specifications under OASIS.

In the second part of this series of articles, I will discuss the Java APIs used to demonstrate the subscription services in WASP UDDI. I assume readers are aware with the UDDI technology and XML schemas.

WASP UDDI

WASP UDDI is the most comprehensive, feature-rich private registry available today for businesses to collaborate between trusted parties using standards protocols. WASP UDDI provides the complete implementation of UDDI Version 2 Specification. In addition to this, it also implements the Subscription service that is part of the UDDI V3 Specification. Its robust implementation and its support across various platforms is the key to its successful adoption as a preferred Web services registry among its customers.

WASP UDDI Subscription APIs

WASP UDDI provides a set of Java APIs for using the subscription mechanism with in its UDDI registry. The interfaces and classes are defined in the package "org.systinet.myuddi.subscription". This package provides classes for subscription management, which includes Subscription API set.

Saving a subscription

Listing 1 shows the usage of WASP UDDI subscription APIs to create a subscription in the UDDI Registry.

String subscriptionKey = null;

// Create a holder for all parameters of save_subscription API
// call.
SaveSubscription saveSubscription = new SaveSubscription();

// Create a holder structure to accomodate information related to
// the subscription.
Subscription subscription = new Subscription();

// Create a Subscription that will expire after one year
long currentTime = System.currentTimeMillis();
long year = 365*24*60*60*1000;
subscription.setExpiresAfter(new Date( currentTime + year ));

// Set notification should contain only 10 records
subscription.setMaxEntities(new MaxEntities(10));

subscription.setBrief(new Brief(true));

// Set the notification interval of the subscription to 1 day.
// This is used in asynchronous subscriptions.
//subscription.setNotificationInterval(new Duration("P1D"));

// Attach the binding key to the subscription, so that
// notifications are sent to services that are specified in the
// accessPoint.
// subscription.setBindingKey(new BindingKey(
                "3409e140-bb66-11d7-ae30-b8a03c50a862"));

// Create subscription filter structure for a subset of
// registry data.
SubscriptionFilter subscriptionFilter = new SubscriptionFilter();

// Create and fill find business structure
FindBusiness findBusiness = new FindBusiness();
findBusiness.addName(new Name("WASP UDDI Subscription"));

// subscriptionFilter holds findBusiness ...
subscriptionFilter.setFindBusiness(findBusiness);

// Set the find_business query as subscriptionFilter to the
// subscription
subscription.setSubscriptionFilter(subscriptionFilter);

Subscriptions subscriptions = new Subscriptions();
subscriptions.add(subscription);

saveSubscription.setSubscriptions(subscriptions);
saveSubscription.setAuthInfo(authToken.getAuthInfo());
Subscriptions response =
     subscriptionService.save_subscription(saveSubscription);
subscriptionKey = response.first().getSubscriptionKey().getValue();
System.out.println("Created Subscription with key : " +
                   subscriptionKey);

Listing 1: Usage of the WASP UDDI's save_subscription call.

Getting subscriptions

Listing 2 shows the usage of WASP UDDI subscription APIs to get the subscriptions registered in the UDD Registry.

Subscriptions subscriptions = null;
String subscriptionKey = null;
// Fill in the request parameter - authInfo
GetSubscriptions getSubscriptions = new GetSubscriptions();
getSubscriptions.setAuthInfo(authToken.getAuthInfo());

// Process get_subscriptions request
subscriptions =
    subscriptionService.get_subscriptions(getSubscriptions);
if (subscriptions != null) {
  subscriptionKey =
    subscriptions.first().getSubscriptionKey().getValue();
} else {
  System.out.println("No subscriptions found.");
}

Listing 2: Usage of the WASP UDDI's get_subscriptions call.

Getting subscription results

Listing 3 shows the usage of WASP UDDI subscription APIs to get the subscription results based on the changes that occurred over a period of time in the UDDI Registry.

// Fill in the request parameters
GetSubscriptionResults getSubscriptionResults =
    new GetSubscriptionResults();

// Set key of existing subscription
getSubscriptionResults.setSubscriptionKey(new SubscriptionKey(
                                          getSubscriptions()));

// Changes in last 2 minutes
long endPoint = System.currentTimeMillis();
long startPoint = endPoint - 2*60*1000;
getSubscriptionResults.setCoveragePeriod(new CoveragePeriod(
                                         new Date(startPoint),
                                         new Date(endPoint)));

// Set user identity
getSubscriptionResults.setAuthInfo(authToken.getAuthInfo());

// Process get_subscriptionResults request
SubscriptionResultsList list =
    subscriptionService.get_subscriptionResults(
        getSubscriptionResults);

Listing 3: Usage of the WASP UDDI's get_subscriptionResults call.

Deleting a subscription

Listing 4 shows the usage of WASP UDDI subscription APIs to delete a subscription in the UDDI Registry.

// Create list of subscriptionKeys with only one subscriptionKey -
// the given parameter
SubscriptionKeys keys = new SubscriptionKeys();
keys.add(new SubscriptionKey(subscriptionKey));

// Fill in the request parameters: subscriptionKey, authToken
DeleteSubscription deleteSubscription =
    new DeleteSubscription(authToken.getAuthInfo(), keys);

// Process delete_subscription request
DispositionReport dispositionReport =
    subscriptionService.delete_subscription(deleteSubscription);

Listing 4: Usage of the WASP UDDI's delete_subscription call.

Setting Up WASP UDDI 4.6

WASP UDDI Version 4.6 is the latest in its product line. You can download a 90-day evaluation version of the product from Systinet's Web site. As a pre-requisite for installation, you need to have J2SE 1.4.x. You can install WASP UDDI 4.6 as a standalone registry or you can deploy it in your preferred applications server. WASP UDDI 4.6 supports leading application servers including BEA WebLogic, IBM WebSphere, Oracle, Orion, Tomcat, Jboss, and Sun ONE Application Server. Its support for leading database engines including Oracle, MS SQL 2000, DB2, PostgreSQL, Sybase, Cloudscape, PointBase, and Hypersonic SQL. In addition to this, WASP 4.6 can be run as a standalone server with an embedded Hypersonic SQL engine.

Start the WASP UDDI server by executing %WASP_HOME%/bin/serverstart.bat.

Once the server is started, open a browser pointing to the URL: http://localhost:8080/uddi/web. You should be seeing the Systinet's WASP UDDI Console. The publishing, inquiry, and subscription URLs are shown below.

PUBLISHING_URL  =https://localhost:8443/uddi/publishing
INQUIRY_URL     =http://localhost:8080/uddi/inquiry
SUBSCRIPTION_URL=http://localhost:8080/uddi/subscription

This article uses Systinet's WASP UDDI 4.6 as a standalone server with an embedded HSQL database engine installed in a Windows 2000 environment.

Conclusion

With the help of subscriptions, a subset of the registry data can be monitored for a specific business need. Subscriptions help businesses to participate in a collaborative environment where they address the needs of a specific industry. More registries should soon become available with this powerful feature in place. The vision of UDDI is coming to reality with its powerful features, such as subscriptions, changing the way businesses collaborate.

References

UDDI Version 3.0
UDDI Spec Technical Committee Specification, 19 July 2002
http://uddi.org/pubs/uddi-v3.00-published-20020719.htm

Subscriptions—A UDDI V3 Mantra
http://dev.systinet.com/download/subscription.pdf

UDDI V3 Subscriptions, Part I
http://www.developer.com/services/article.php/3088901

Systinet WASP UDDI 4.6 Product Overview
http://www.systinet.com/products/wasp_uddi/overview

Systinet WASP UDDI 4.6 Product Documentation
http://www.systinet.com/doc/wasp_uddi/uddi/index.html

Systinet WASP UDDI 4.6 Evaluation Version—Download
http://www.systinet.com/products/wasp_uddi/download/list

About the Author

Arulazi Dhesiaseelan has been working as a Senior Software Engineer for Hewlett-Packard. He has a Master of Computer Applications Degree from the PSG College of Technology, India. He has more than three years of industry experience. He was also involved in the UDDI4J project hosted at http://uddi4j.org. He has been working on Web Service-related technologies such as WSDL, UDDI, and SOAP. Currently, he is involved in developing an object-based infrastructure for mobile solutions. He can be reached at aruld@acm.org.


Tools:
Add www.developer.com to your favorites
Add www.developer.com to your browser search box
IE 7 | Firefox 2.0 | Firefox 1.5.x
Receive news via our XML/RSS feed


Web Services Archives

Work With InterSystems. Not Separate Systems. Rapidly develop and deploy connectable applications.
Flash Demo: Learn how IBM Information Server Blade is easy to manage, highly scalable and efficient.
Is it time to make your move to the multi-threaded and parallel processing world? Find out!
Generate Complete .NET Web Apps in Minutes . Download Iron Speed Designer today.
Whitepaper: Enterprise Information Integration--Deployment Best Practices for Low-Cost Implementation



JupiterOnlineMedia

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

Solutions
Whitepapers and eBooks
Microsoft Article: HyperV-The Killer Feature in WinServer ‘08
Avaya Article: How to Feed Data into the Avaya Event Processor
Microsoft Article: Install What You Need with Win Server ‘08
HP eBook: Putting the Green into IT
Whitepaper: HP Integrated Citrix XenServer for HP ProLiant Servers
Intel Go Parallel Portal: Interview with C++ Guru Herb Sutter, Part 1
Intel Go Parallel Portal: Interview with C++ Guru Herb Sutter, Part 2--The Future of Concurrency
Avaya Article: Setting Up a SIP A/S Development Environment
IBM Article: How Cool Is Your Data Center?
Microsoft Article: Managing Virtual Machines with Microsoft System Center
HP eBook: Storage Networking , Part 1
Microsoft Article: Solving Data Center Complexity with Microsoft System Center Configuration Manager 2007
MORE WHITEPAPERS, EBOOKS, AND ARTICLES
Webcasts
Intel Video: Are Multi-core Processors Here to Stay?
On-Demand Webcast: Five Virtualization Trends to Watch
HP Video: Page Cost Calculator
Intel Video: APIs for Parallel Programming
HP Webcast: Storage Is Changing Fast - Be Ready or Be Left Behind
Microsoft Silverlight Video: Creating Fading Controls with Expression Design and Expression Blend 2
MORE WEBCASTS, PODCASTS, AND VIDEOS
Downloads and eKits
Sun Download: Solaris 8 Migration Assistant
Sybase Download: SQL Anywhere Developer Edition
Red Gate Download: SQL Backup Pro and free DBA Best Practices eBook
Red Gate Download: SQL Compare Pro 6
Iron Speed Designer Application Generator
MORE DOWNLOADS, EKITS, AND FREE TRIALS
Tutorials and Demos
How-to-Article: Preparing for Hyper-Threading Technology and Dual Core Technology
eTouch PDF: Conquering the Tyranny of E-Mail and Word Processors
IBM Article: Collaborating in the High-Performance Workplace
HP Demo: StorageWorks EVA4400
Intel Featured Algorhythm: Intel Threading Building Blocks--The Pipeline Class
Microsoft How-to Article: Get Going with Silverlight and Windows Live
MORE TUTORIALS, DEMOS AND STEP-BY-STEP GUIDES