首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >接入点的JUDDI查询(find)

接入点的JUDDI查询(find)
EN

Stack Overflow用户
提问于 2012-09-01 14:17:45
回答 1查看 491关注 0票数 0

我需要找到或做一个查询,以便从已经发布的服务中使用JUDDI获得接入点。我遵循了Apache jUDDI: Finding Templates中的步骤。但是它不起作用,我从Tomcat服务器得到以下错误:

代码语言:javascript
复制
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中也会显示相同的错误:

代码语言:javascript
复制
javax.xml.ws.soap.SOAPFaultException: At least one name, categoryBag, find_tModel or tModelBag or name must be supplied

我的代码片段如下:

代码语言:javascript
复制
        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());
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2012-09-01 22:28:26

不要紧,我通过Apache JUDDI的项目邮件列表解决了这个问题。感谢秦玉珠的帮助。代码可以如下所示:

代码语言:javascript
复制
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);
}
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/12225405

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档