Retrieving a businessEntity Record

Our second example runs the proxy get_businessDetail( ) method and prints out portions of the full businessEntity record. The program expects a single command-line argument, in which you can specify the businessKey for a business.

For example, the following command line:

java com.ecerami.uddi.getBusinessDetail 0076b468-eb27-42e5-ac09-9955cff462a3

generates the following output:

Business Name:  Microsoft Corporation
Description:  Empowering people through great software - any time, any place
and on any device is Microsoft's vision. As the worldwide leader in software
for personal and business computing, we strive to produce innovative products and services that meet our customer's
Contact:  Corporate Mailing Addresses
Address:  Microsoft Corporation
Address:  One Microsoft Way
Address:  Redmond, WA 98052-6399
Address:  USA
Contact:  World Wide Operations
Email:  martink@microsoft.com

The complete code is shown in Example 9-2. Note that the get_businessDetail( ) method returns a BusinessDetail object. You can then navigate through the BusinessDetail object to display any portion of the record you want. In this case, the code displays the business name, description, and contact information. For details on navigating through the BusinessDetail object, refer to the com.ibm.uddi.datatype.business package in the Quick Reference API (discussed in Chapter 8).

Example 9-2. getBusinessDetail.java
package com.ecerami.uddi; /** * Sample UDDI Program: retrieves the businessEntity ...

Get Web Services Essentials now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.