すでに公開されているサービスから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
また、NetbeansIDEでも同じエラーが次のように示されます。
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());