Developing Web Services with Java APIs for XML Using WSDP

Storing Information in a Registry

In the section, Using the Default Registry, we explained how the Registry Browser can be used for adding an organization to the registry. In this section, we perform the tasks of adding/deleting an organization to/from the registry and modifying existing records using JWSDP classes. We use IBM s test registry in the examples given in this section.

Adding New Registry Records

We again begin by making a connection to the registry using the connection() method. (Please refer to the section, Connecting to a Registry, to review how the connection() method works.) The first step in creating an organization is providing a username and password to the registry for authentication. The authentication information is used to set the credentials for the connection object as shown in the following code snippet:

String username = "Yash1";String password = "yashraj1";<a name="738"></a><a name="beginpage.BF51C766-E111-4318-976E-F4B53708FEFE"></a>PasswordAuthentication userdetail;userdetail = new PasswordAuthentication (username, passw.toCharArray());Set user = new HashSet();user.add(userdetail);connection.setCredentials(user);

Recollect from the discussions in the Using the Default Registry section that you need to create an IBM UDDI Account to obtain the username and password.

Next, we create a business life cycle manager to create an organization that we can submit to the registry:

BusinessLifeCycleManager blmanager;blmanager = myservice.getBusinessLifeCycleManager();

We use a BusinessLifeCycleManager object since it provides methods that are required to set the necessary information pertaining to an organization, as will be clear from the following discussions.

We use the createOrganization() method of the business life cycle manager to create an Organization object...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Linear Limit Switches
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.