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 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."); } }
ServiceDetail result = inquiry.getServiceDetail(getServiceDetail);
String bizkey = null; try { ServiceDetail serviceDetail = uddiInquiryService.getServiceDetail(gsd); if (serviceDetail != null) { if (!serviceDetail.getBusinessService().isEmpty()) {
ServiceDetail response = null; try { response = inquiry.getServiceDetail(req);
serviceDetail = config.inquiry.getServiceDetail(req);
ServiceDetail serviceDetail = config.inquiry.getServiceDetail(sd); for (int i = 0; i < serviceDetail.getBusinessService().size(); i++) { ret.append("<tr><td>")
ServiceDetail sd = inquiry.getServiceDetail(gs); List<BusinessService> bsOutList = sd.getBusinessService(); BusinessService bsOut = bsOutList.get(0);
sresponse = inquiry.getServiceDetail(sreq); } catch (Exception ex) { log.log(Level.ERROR, "error discoverying agent endpoints", ex);
getServiceDetail.setAuthInfo(getAuthToken(node.getSecurityUrl())); try { ServiceDetail sd = getUDDINode(node).getTransport().getUDDIInquiryService(node.getInquiryUrl()).getServiceDetail(getServiceDetail); List<BusinessService> businessServiceList = sd.getBusinessService(); if (businessServiceList.size() == 0) {
/** * 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; }