我需要查找或查询以从已发布的服务中使用 JUDDI 获取接入点。我按照Apache jUDDI 中讲述的过程:查找模板。但它没有成功,我从 Tomcat 服务器收到以下错误:
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
同样的错误在 Netbeans IDE 中也显示为:
javax.xml.ws.soap.SOAPFaultException: At least one name, categoryBag, find_tModel or tModelBag or name must be supplied
我的代码片段如下:
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());