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); }
public static GetServiceDetail MapGetServiceDetail(org.uddi.api_v2.GetServiceDetail body) { if (body == null) { return null; } GetServiceDetail r = new GetServiceDetail(); r.getServiceKey().addAll(body.getServiceKey()); return r; }
public static org.uddi.api_v2.GetServiceDetail MapGetServiceDetail(org.uddi.api_v3.GetServiceDetail body) { GetServiceDetail r = new GetServiceDetail(); r.getServiceKey().addAll(body.getServiceKey()); r.setGeneric(VERSION); return r; }
this.getEntityPublisher(em, body.getAuthInfo()); List<String> serviceKeyList = body.getServiceKey(); for (String serviceKey : serviceKeyList) { org.apache.juddi.model.BusinessService modelBusinessService = null;
/** * Create an instance of {@link GetServiceDetail } * */ public GetServiceDetail createGetServiceDetail() { return new GetServiceDetail(); }
/** * Gets service details or NULL if it doesn't exist or an error occurred * * @param getDetail * @param node * @return null if not found * @throws RemoteException * @throws TransportException * @throws ConfigurationException */ public ServiceDetail getServiceDetail(GetServiceDetail getDetail, Node node) throws RemoteException, TransportException, ConfigurationException { getDetail.setAuthInfo(getAuthToken(node.getSecurityUrl())); try { ServiceDetail tModelDetail = getUDDINode(node).getTransport().getUDDIInquiryService(node.getInquiryUrl()).getServiceDetail(getDetail); return tModelDetail; } catch (DispositionReportFaultMessage dr) { DispositionReport report = DispositionReportFaultMessage.getDispositionReport(dr); checkForErrorInDispositionReport(report, null, null); } catch (SOAPFaultException sfe) { DispositionReport report = DispositionReportFaultMessage.getDispositionReport(sfe); checkForErrorInDispositionReport(report, null, null); } catch (UndeclaredThrowableException ute) { DispositionReport report = DispositionReportFaultMessage.getDispositionReport(ute); checkForErrorInDispositionReport(report, null, null); } catch (Throwable t){ throw new RemoteException("Unhandled exception", t); } return null; }
public void saveService2(String authInfo, String serviceKey, String serviceXML2, String serviceKey2) { try { // First save the entity SaveService ss = new SaveService(); ss.setAuthInfo(authInfo); org.uddi.api_v3.BusinessService bsIn = (org.uddi.api_v3.BusinessService)EntityCreator.buildFromDoc(serviceXML2, "org.uddi.api_v3"); ss.getBusinessService().add(bsIn); publication.saveService(ss); // Now get the entity and check the values GetServiceDetail gs = new GetServiceDetail(); gs.getServiceKey().add(serviceKey); gs.getServiceKey().add(serviceKey2); ServiceDetail sd = inquiry.getServiceDetail(gs); List<BusinessService> bsOutList = sd.getBusinessService(); int size = bsOutList.size(); assertEquals(2, size); } catch(Exception e) { logger.error(e.getMessage(), e); Assert.fail("No exception should be thrown."); } }
/** * "Used to get full details for a given set of registered businessService * data. Returns a serviceDetail message." * * @exception RegistryV3Exception; */ public ServiceDetail getServiceDetail(String[] serviceKeyArray) throws RegistryV3Exception { GetServiceDetail request = this.objectFactory.createGetServiceDetail(); if (serviceKeyArray != null) { request.getServiceKey().addAll(Arrays.asList(serviceKeyArray)); } ServiceDetail sd = null; JAXBElement<?> o = execute(this.objectFactory.createGetServiceDetail(request), this.getInquiryURI()); if (o != null) sd = (ServiceDetail) o.getValue(); return sd; }
this.getEntityPublisher(em, body.getAuthInfo()); List<String> serviceKeyList = body.getServiceKey(); for (String serviceKey : serviceKeyList) { org.apache.juddi.model.BusinessService modelBusinessService = null;
private static boolean CheckServiceAndParentForSignature(String serviceKey, UDDIInquiryPortType uddiInquiryService, String token) throws UnexpectedResponseException { GetServiceDetail gsd = new GetServiceDetail(); gsd.setAuthInfo(token); gsd.getServiceKey().add(serviceKey); String bizkey = null; try {
protected void inquiry(String servicekey) { try { GetServiceDetail r = new GetServiceDetail(); r.getServiceKey().add(servicekey); ServiceDetail serviceDetail = inquiry.getServiceDetail(r); if (serviceDetail != null && serviceDetail.getBusinessService() != null && !serviceDetail.getBusinessService().isEmpty()) { JAXBContext jc = JAXBContext.newInstance(ServiceDetail.class); //JAXB.marshal(jc, null); // Unmarshaller u = jc.createUnmarshaller(); // Object element = u.unmarshal(new File("foo.xml")); //note, this doesn't work Marshaller m = jc.createMarshaller(); StringWriter sw = new StringWriter(); m.marshal(serviceDetail, sw); //Marshalling to a File: log.log(Level.INFO, "Results" + sw.toString()); } else { log.log(Level.WARN, "no results return "); //return ""; } } catch (Exception ex) { Logger.getLogger(UddiPublisher.class.getName()).log(Level.ERROR, null, ex); } // return ""; }
public void validateGetServiceDetail(GetServiceDetail body) throws DispositionReportFaultMessage { // No null input if (body == null) { throw new FatalErrorException(new ErrorMessage("errors.NullInput")); } // No null or empty list List<String> entityKeyList = body.getServiceKey(); if (entityKeyList == null || entityKeyList.size() == 0) { throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.NoKeys")); } HashSet<String> dupCheck = new HashSet<String>(); int i = 0; for (String entityKey : entityKeyList) { // Per section 4.4: keys must be case-folded entityKey = entityKey.toLowerCase(); entityKeyList.set(i, entityKey); boolean inserted = dupCheck.add(entityKey); if (!inserted) { throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.DuplicateKey", entityKey)); } i++; } }
token = LoginWrapper(); GetServiceDetail req = new GetServiceDetail(); req.getServiceKey().add(key); req.setAuthInfo(token); ServiceDetail response = null; try {
public void findServiceDetail(String serviceKey) { try { GetServiceDetail getServiceDetail = new GetServiceDetail(); getServiceDetail.getServiceKey().add(serviceKey);
public void validateGetServiceDetail(GetServiceDetail body) throws DispositionReportFaultMessage { // No null input if (body == null) { throw new FatalErrorException(new ErrorMessage("errors.NullInput")); } // No null or empty list List<String> entityKeyList = body.getServiceKey(); if (entityKeyList == null || entityKeyList.size() == 0) { throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.NoKeys")); } HashSet<String> dupCheck = new HashSet<String>(); int i = 0; for (String entityKey : entityKeyList) { // Per section 4.4: keys must be case-folded entityKey = entityKey.toLowerCase(); entityKeyList.set(i, entityKey); boolean inserted = dupCheck.add(entityKey); if (!inserted) { throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.DuplicateKey", entityKey)); } i++; } }
GetServiceDetail getServiceDetail = new GetServiceDetail(); getServiceDetail.getServiceKey().add(serviceKey); getServiceDetail.setAuthInfo(getAuthToken(node.getSecurityUrl())); try { ServiceDetail sd = getUDDINode(node).getTransport().getUDDIInquiryService(node.getInquiryUrl()).getServiceDetail(getServiceDetail);
GetServiceDetail gs = new GetServiceDetail(); gs.getServiceKey().add(serviceKey); ServiceDetail sd = inquiry.getServiceDetail(gs); List<BusinessService> bsOutList = sd.getBusinessService();
missingKeyBag.setDeleted(true); List<org.apache.juddi.model.BusinessService> existingList = new ArrayList<org.apache.juddi.model.BusinessService>(0); for (String key : getDetail.getServiceKey()) { org.apache.juddi.model.BusinessService modelBusinessService = em.find(org.apache.juddi.model.BusinessService.class, key); if (modelBusinessService != null)
GetServiceDetail req = null; try { req = new GetServiceDetail(); req.setAuthInfo(LoginWrapper()); req.getServiceKey().add(servicekey); serviceDetail = config.inquiry.getServiceDetail(req);
return ""; GetServiceDetail sd = new GetServiceDetail(); for (int i = 0; i < findService.getServiceInfos().getServiceInfo().size(); i++) { sd.getServiceKey().add(findService.getServiceInfos().getServiceInfo().get(i).getServiceKey());