• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Finding Business Key given Business Entity Name in OpenUDDI

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear All,

I am working with OpenUDDI to publish and invoke the Web service descriptions. I would like to invoke the published service descriptions (through the unique business key of each business entity) by providing the Inquiry URL and Business Entity name. Could any one please point me to the programming logic to achieve this?

I attach the code found at Sourceforge site for retrieving the service descriptions given the business key and Inquiry URL (Bold Lines). But I would like to retrieve using business entity name rather than business key. Please help me.


________________________________________________________________________________________________________________________________________________________________

import java.io.IOException;
import dk.itst.uddi.client.ConnectionInfo;
import dk.itst.uddi.client.UDDIClient;
import dk.itst.uddi.client.query.FindServiceQuery;
import dk.itst.uddi.client.query.FindServiceResult;
import dk.itst.uddi.client.types.core.AccessPoint;
import dk.itst.uddi.client.types.core.BindingTemplate;
import dk.itst.uddi.client.types.core.BindingTemplates;
import dk.itst.uddi.client.types.core.BusinessService;

public class Main
{

/**
* @param args the command line arguments
*/
public static void main(String[] args) throws IOException
{

ConnectionInfo ci = new ConnectionInfo();
ci.setInquiry("http://10.6.8.13:8080/uddi/services/inquiry");
UDDIClient client = new UDDIClient(ci);
//set Business key here
FindServiceQuery q = client.getInquiry().findService().setBusinessKey("uddi:mydomain.com:2bf81ecd-1b24-43d0-8580-41a28a5000bf");
FindServiceResult services = q.execute();
String serviceKey = null;
for (int i = 0; i < services.getCount(); i++)
{
serviceKey = services.getServiceInfos()[i].getServiceKey();
System.err.println("Service key found at: " + serviceKey);
}

BusinessService service = client.getInquiry().getService(serviceKey);
BindingTemplates bt = service.getBindingTemplates();
for (int i = 0; i < bt.sizeOfBindingTemplateArray(); i++)
{
BindingTemplate bindingTemplateFound = bt.getBindingTemplateArray(i);
System.err.println("BindingKey :" + bindingTemplateFound.getBindingKey());
AccessPoint ap = bindingTemplateFound.getAccessPoint();
System.out.println("Web Service Endpoint is at: \n" + ap.getStringValue());
}

}
}

_______________________________________________________________________________________________________________________________________________________________

Awaiting for your reply ASAP.

Thank you.[color=black]
 
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
UDDIQuery might help.
 
reply
    Bookmark Topic Watch Topic
  • New Topic