This is one part of my code. With this I can get the query to accesspoint .Hope
it helps.
ServiceList list1=inquiryService.findService(findservice);
GetServiceDetail gsd=new GetServiceDetail();
for(ServiceInfo serviceInfo
:list1.getServiceInfos().getServiceInfo()){
gsd.getServiceKey().add(serviceInfo.getServiceKey());
System.out.println(serviceInfo.getServiceKey());
String servicekey=serviceInfo.getServiceKey();
GetServiceDetail getServiceDetail=new GetServiceDetail();
getServiceDetail.setAuthInfo(authinfo);
getServiceDetail.getServiceKey().add(servicekey);
ServiceDetail
serviceDetail=inquiryService.getServiceDetail(getServiceDetail);
BusinessService
businessservice=serviceDetail.getBusinessService().get(0);
System.out.println("fetched service
name:"+businessservice.getName().get(0).getValue());
String bindingkey =
businessservice.getBindingTemplates().getBindingTemplate().get(0).getBindingKey();
System.out.println(bindingkey);
GetBindingDetail gbd = new GetBindingDetail();
gbd.setAuthInfo(authinfo);
gbd.getBindingKey().add(bindingkey);
BindingDetail
bindingdetail=inquiryService.getBindingDetail(gbd);
BindingTemplate
bindingtemplate=bindingdetail.getBindingTemplate().get(0);
String
accesspoint=bindingtemplate.getAccessPoint().getValue();
System.out.println(accesspoint);
}
> Date: Sat, 1 Sep 2012 16:53:53 +0530
> Subject: JUDDI inquiry (find) for access point
> From: [email protected]
> To: [email protected]
>
> I'm using juddi-portal-bundle-3.1.3. I need to find or do an inquiry
> for getting the access point using JUDDI from an already published
> service. I followed the procedure told in
> "http://stackoverflow.com/questions/5991920/apache-juddi-finding-templates".
> But it didn't work out and i get the following error from the Tomcat
> server:
>
> "Sep 01, 2012 11:29:58 AM
> org.apache.cxf.phase.PhaseInterceptorChain doDefaultLogging
> INFO: Application
> {urn:uddi-org:v3_service}UDDIInquiryService#{urn:uddi-org:v3_service}find_service
> has thrown exception, unwinding now:
> org.apache.juddi.v3.error.FatalErrorException:
> At least one name, categoryBag, find_tModel or tModelBag or
> name must be supplied"
>
> And also the same error is indicated in Netbeans IDE as:
>
> "javax.xml.ws.soap.SOAPFaultException: At least one name,
> categoryBag, find_tModel or tModelBag or name must be supplied"
>
> My code snippet is as follows:
>
> FindService fs = new FindService();
> fs.setAuthInfo(rootAuthToken.getAuthInfo());
> fs.setBusinessKey("uddi:juddi.apache.org:e7180bfb-3c36-451e-86aa-f7605a96587c");
> ServiceList sl = inquiry.findService(fs);
> ServiceInfos si = sl.getServiceInfos();
> GetServiceDetail gsd = new GetServiceDetail();
> ServiceDetail sd = inquiry.getServiceDetail(gsd);
> BusinessService bs = (BusinessService) sd.getBusinessService();
> BindingTemplates bts = bs.getBindingTemplates();
> BindingTemplate bt = (BindingTemplate) bts.getBindingTemplate();
> AccessPoint ap = bt.getAccessPoint();
> wsdlTA.setText(ap.getValue());
>
> --
> Petrus Chris Nitin Adonis
> Exchange Student | Third Year B. Tech.
> Department of Systems Engineering
> University of Arkansas at Little Rock
> Little Rock | Arkansas 72204 | United States
>
> Home University:
> Department of Information Technology
> Pondicherry Engineering College
> Pillaichavady | Pondicherry - 605 014 | India