Comments
yourfanat wrote: I am using another tool for Oracle developers - dbForge Studio for Oracle. This IDE has lots of usefull features, among them: oracle designer, code competion and formatter, query builder, debugger, profiler, erxport/import, reports and many others. The latest version supports Oracle 12C. More information here.
Cloud Computing
Conference & Expo
November 2-4, 2009 NYC
Register Today and SAVE !..

2008 West
DIAMOND SPONSOR:
Data Direct
SOA, WOA and Cloud Computing: The New Frontier for Data Services
PLATINUM SPONSORS:
Red Hat
The Opening of Virtualization
GOLD SPONSORS:
Appsense
User Environment Management – The Third Layer of the Desktop
Cordys
Cloud Computing for Business Agility
EMC
CMIS: A Multi-Vendor Proposal for a Service-Based Content Management Interoperability Standard
Freedom OSS
Practical SOA” Max Yankelevich
Intel
Architecting an Enterprise Service Router (ESR) – A Cost-Effective Way to Scale SOA Across the Enterprise
Sensedia
Return on Assests: Bringing Visibility to your SOA Strategy
Symantec
Managing Hybrid Endpoint Environments
VMWare
Game-Changing Technology for Enterprise Clouds and Applications
Click For 2008 West
Event Webcasts

2008 West
PLATINUM SPONSORS:
Appcelerator
Get ‘Rich’ Quick: Rapid Prototyping for RIA with ZERO Server Code
Keynote Systems
Designing for and Managing Performance in the New Frontier of Rich Internet Applications
GOLD SPONSORS:
ICEsoft
How Can AJAX Improve Homeland Security?
Isomorphic
Beyond Widgets: What a RIA Platform Should Offer
Oracle
REAs: Rich Enterprise Applications
Click For 2008 Event Webcasts
In many cases, the end of the year gives you time to step back and take stock of the last 12 months. This is when many of us take a hard look at what worked and what did not, complete performance reviews, and formulate plans for the coming year. For me, it is all of those things plus a time when I u...
SYS-CON.TV
Stretching UDDI
Develop your own Java apps to consume Web services

UDDI (Universal Description, Discovery, and Integration) is fast becoming a standard for storing business processes available on the Web. Although UDDI is capable of storing many different types of data, for the purposes of this article I'll focus on how UDDI can be used to register Web services, thereby making them available for application-level consumption.

What Is Covered?
This article provides Java developers with a fast and simple way to develop their own UDDI Java applications to consume Web services registered within a UDDI Registry. The sample code (the source code is online at www.sys-con.com/webservices/sourcec.cfm) contains a payroll Web service (deployed from an entity bean) and a UDDI session bean.

Background
This article is based heavily on the tutorial Discover Web services with the WSDK V5.1: UDDI cited in the Resources section. I will present an extension to the basic UDDI4J classes so you can quickly set up your own UDDI registry of Web services. While working through the Discover Web services with the WSDK V5.1: UDDI tutorial, I developed an extension API that provides a higher-level approach to the UDDI4J API. This article extends only a small subset of that functionality, since its purpose is to register, discover, and consume a Web service stored within a UDDI Registry. For a broader discussion of UDDI and its uses beyond storing Web services, please see Understanding UDDI by Tom Bellwood.

Payroll Web Service
The Payroll.ear file contains an EJB project named PayrollEjbPrj. Within this EJB project are two entity beans, Department and Employee, and one session bean, Payroll. The Department and Employee entity beans expose getter and setter methods for the sample database. The Payroll bean, which exposes 12 methods, uses the getter methods of the entity beans to query various pieces of information from the sample database. The sample code can easily be extended to provide setter functionality from within the Payroll bean. Exposing all of the sample database fields is beyond the scope of this article.

UDDIClient Session EJB
The UDDIClient session bean makes almost exclusive use of the UDDI utility API discussed in the next section.

A UDDI Registry may contain Businesses, Services, and TModels. The UDDIClient bean provides a publish() and two delete() methods for each type of UDDI entry. As shown in the method signatures in Listing 1, these methods are as simple as possible, while shifting the work to the UDDI Utility API.

Methods getService and executeService
The getService and executeService methods of the provided UDDIClient bean demonstrate how to retrieve our Payroll Web service and invoke some of its methods. The executeService method takes a string representing the name of a service stored in the registry. In the sample code, the service registered is the Payroll Web service. For this article, I've hard coded two methods that are called from the Payroll Web service found within the registry (see Listing 2).

UDDI Utility API
The UDDI Utility API has four main classes, three of which are shown in Listings 3?5. The fourth, Utilities.class, contains all of the setup information for the UDDI Registry. The values and structure are explained in detail in the Publishing your services on UDDI with the WSDK V5.1 tutorial (see Listing 3).

Configuration Assumptions
You are using IBM WebSphere Studio Application Developer 5.0 or another J2EE- compliant development environment such as the Eclipse IDE.

A DB2 application has been installed and a sample database has been created. (This sample uses the Employee and Department tables. To create the sample database, Open DB2 First Steps and click on the "Create Sample Database" link).

A UDDI Registry is installed and properly configured. Please see the InstallUDDI listing for an automated setup of a UDDI Registry to use the Cloudscape Database. Execute installuddilibs.bat from a command window to create the necessary directory structure.

Summary
As you have seen, UDDI programming can be a very powerful way to share information on the Web via the UDDI Registry. This sample code, and more specifically the UDDI Utility API, are provided as a starting point from which you can develop a more customized solution.

Resources
Code

  • UDDI Utilities API Javadoc: In the UDDI Proxy.zip's doc directory. There is only one index.html located in the doc directory. Use it to reference all of the Javadoc for the entire article.
  • UDDI Utilities API source: In the UDDI Proxy.zip's Utility API Source directory
  • Sample code: In UDDI Proxy.zip there are two .ear files, UddiClientEAR.ear and PayrollEAR.ear. Both are needed.
  • UDDI Registry installer In the UDDI Proxy.zip's InstallUDDI directory: There are a number of libs and a batch file named installuddilibs.bat. The bat file installs the uddi registry to use Cloudscape.

    Specifications

  • SOAP 1.1 Specification: www.w3.org/TR/soap
  • UDDI Specification: www.oasis-open.org/committees/tc_home.php?wg_abbrev=uddi-spec
  • WS-I Basic Profile: www.ws-i.org/Profiles/BasicProfile-1.0-2004-04-16.html
  • WSDL 1.1 Specification: www.w3.org/TR/wsdl.html

    Tools

  • IBM WebSphere Studio Application Developer: www-306.ibm.com/software/awdtools/studioappdev
  • IBM WSDL4J Project on developerWorks: www-124.ibm.com/developerworks/projects/wsdl4j/
  • Eclipse: www.eclipse.org

    Other Resources

  • Publishing your services on UDDI with the WSDK V5.1: www-106.ibm.com/developerworks/edu/ ws-dw-ws-psuddi51-i.html?S_TACT=104AHW04&S_CMP=EDU
  • Discover Web services with the WSDK V5.1: UDDI: www-106.ibm.com/developerworks/webservices/edu/ ws-dw-ws-dwsuddi51-i.html
  • Understanding UDDI: www-106.ibm.com/developerworks/webservices/library/ws-featuddi
  • UDDI4J Web site: www-124.ibm.com/developerworks/oss/uddi4j/
  • UDDI home page: www.uddi.org
  • About Andrew J. Bradfield
    Andrew J. Bradfield is an advisory software engineer at IBM's Software Division located at the IBM T.J. Watson Research Center in Hawthorne, NY. His projects include J2EE development of content management and data management solutions. Andrew graduated with a degree in computer science from Hamilton College in Clinton, NY.

    In order to post a comment you need to be registered and logged in.

    Register | Sign-in

    Reader Feedback: Page 1 of 1

    SOA World Latest Stories
    Containers and Kubernetes allow for code portability across on-premise VMs, bare metal, or multiple cloud provider environments. Yet, despite this portability promise, developers may include configuration and application definitions that constrain or even eliminate application portabil...
    Most DevOps journeys involve several phases of maturity. Research shows that the inflection point where organizations begin to see maximum value is when they implement tight integration deploying their code to their infrastructure. Success at this level is the last barrier to at-will d...
    DevOpsSummit New York 2018, colocated with CloudEXPO | DXWorldEXPO New York 2018 will be held November 11-13, 2018, in New York City. Digital Transformation (DX) is a major focus with the introduction of DXWorldEXPO within the program. Successful transformation requires a laser focus ...
    CloudEXPO New York 2018, colocated with DXWorldEXPO New York 2018 will be held November 11-13, 2018, in New York City and will bring together Cloud Computing, FinTech and Blockchain, Digital Transformation, Big Data, Internet of Things, DevOps, AI, Machine Learning and WebRTC to one l...
    In his session at 20th Cloud Expo, Scott Davis, CTO of Embotics, discussed how automation can provide the dynamic management required to cost-effectively deliver microservices and container solutions at scale. He also discussed how flexible automation is the key to effectively bridging...
    Modern software design has fundamentally changed how we manage applications, causing many to turn to containers as the new virtual machine for resource management. As container adoption grows beyond stateless applications to stateful workloads, the need for persistent storage is founda...
    Subscribe to the World's Most Powerful Newsletters
    Subscribe to Our Rss Feeds & Get Your SYS-CON News Live!
    Click to Add our RSS Feeds to the Service of Your Choice:
    Google Reader or Homepage Add to My Yahoo! Subscribe with Bloglines Subscribe in NewsGator Online
    myFeedster Add to My AOL Subscribe in Rojo Add 'Hugg' to Newsburst from CNET News.com Kinja Digest View Additional SYS-CON Feeds
    Publish Your Article! Please send it to editorial(at)sys-con.com!

    Advertise on this site! Contact advertising(at)sys-con.com! 201 802-3021


    SYS-CON Featured Whitepapers
    ADS BY GOOGLE