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; }
/** * "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; }
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."); } }
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++; } }
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++; } }
public void findServiceDetail(String serviceKey) { try { GetServiceDetail getServiceDetail = new GetServiceDetail(); getServiceDetail.getServiceKey().add(serviceKey);
List<String> serviceKeyList = body.getServiceKey(); for (String serviceKey : serviceKeyList) { org.apache.juddi.model.BusinessService modelBusinessService = null;
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 {
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); }
req.getServiceKey().add(key); req.setAuthInfo(token); ServiceDetail response = null;
req.setAuthInfo(LoginWrapper()); req.getServiceKey().add(servicekey); serviceDetail = config.inquiry.getServiceDetail(req);
sd.getServiceKey().add(findService.getServiceInfos().getServiceInfo().get(i).getServiceKey());
gs.getServiceKey().add(serviceKey); ServiceDetail sd = inquiry.getServiceDetail(gs); List<BusinessService> bsOutList = sd.getBusinessService();
TransportException, ConfigurationException { GetServiceDetail getServiceDetail = new GetServiceDetail(); getServiceDetail.getServiceKey().add(serviceKey); getServiceDetail.setAuthInfo(getAuthToken(node.getSecurityUrl())); try {
sreq.getServiceKey().add(response.getServiceInfos().getServiceInfo().get(k).getServiceKey());
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)
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)