Methods Summary |
---|
public com.ibm.uddi.response.BusinessDetail | getBusinessDetail(java.lang.String businessKey)Retreive Business Detail Record
// Create UDDI Proxy Object
UDDIProxy proxy = new UDDIProxy();
// Point to Microsoft Inquiry URL
proxy.setInquiryURL("http://uddi.microsoft.com/inquire");
// Retrieve BusinessDetail record
BusinessDetail businessDetail = proxy.get_businessDetail(businessKey);
return businessDetail;
|
public static void | main(java.lang.String[] args)Main Method
try {
getBusinessDetail inquiry = new getBusinessDetail();
BusinessDetail businessDetail = inquiry.getBusinessDetail (args[0]);
inquiry.print_businessDetail (businessDetail);
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (SOAPException e) {
e.printStackTrace();
} catch (UDDIException e) {
// Extract UDDI Disposition Report
DispositionReport dr = e.getDispositionReport();
if (dr!=null) {
System.out.println("UDDIException faultCode:" +
e.getFaultCode() +
"\n errno:" + dr.getErrno() +
"\n errCode:" + dr.getErrCode() +
"\n errInfoText:" + dr.getErrInfoText());
}
e.printStackTrace();
}
|
private void | print_addressVector(java.util.Vector addressVector)Print Address Data
for (int i=0; i< addressVector.size(); i++) {
Address address = (Address) addressVector.elementAt(i);
Vector addressLines = address.getAddressLineVector();
for (int j=0; j<addressLines.size(); j++) {
AddressLine addressLine = (AddressLine) addressLines.elementAt(j);
String addressText = addressLine.getText();
System.out.println("Address: "+addressText);
}
}
|
private void | print_businessDetail(com.ibm.uddi.response.BusinessDetail businessDetail)Print Business Entity Data
Vector businessEntityVector = businessDetail.getBusinessEntityVector();
for (int i = 0; i < businessEntityVector.size(); i++) {
BusinessEntity businessEntity =
(BusinessEntity) businessEntityVector.elementAt(i);
String name = businessEntity.getNameString();
String description = businessEntity.getDefaultDescriptionString();
System.out.println ("Business Name: "+name);
System.out.println ("Description: "+description);
Contacts contacts = businessEntity.getContacts();
print_contacts (contacts);
}
|
private void | print_contacts(Contacts contacts)Print Contact Data
Vector contactVector = contacts.getContactVector();
for (int j=0; j< contactVector.size(); j++) {
Contact contact = (Contact) contactVector.elementAt (j);
String description = contact.getDefaultDescriptionString();
Vector addressVector = contact.getAddressVector();
Vector emailVector = contact.getEmailVector();
System.out.println ("Contact: "+ description);
print_addressVector (addressVector);
print_emailVector (emailVector);
}
|
private void | print_emailVector(java.util.Vector emailVector)Print Email Data
for (int i=0; i< emailVector.size(); i++) {
Email email = (Email) emailVector.elementAt(i);
String emailText = email.getText();
System.out.println ("Email: "+emailText);
}
|