public static org.uddi.api_v2.GetBindingDetail MapGetBindingDetail(org.uddi.api_v3.GetBindingDetail body) { GetBindingDetail r = new GetBindingDetail(); r.getBindingKey().addAll(body.getBindingKey()); r.setGeneric(VERSION); return r; }
public void saveBinding(String authInfo, String bindingXML, String bindingKey) { try { // First save the entity SaveBinding sb = new SaveBinding(); sb.setAuthInfo(authInfo); sb.setGeneric("2.0"); BindingTemplate btIn = (BindingTemplate)EntityCreator.buildFromDoc(bindingXML, "org.uddi.api_v2"); sb.getBindingTemplate().add(btIn); publication.saveBinding(sb); // Now get the entity and check the values GetBindingDetail gb = new GetBindingDetail(); gb.setGeneric("2.0"); gb.getBindingKey().add(bindingKey); BindingDetail bd = inquiry.getBindingDetail(gb); List<BindingTemplate> btOutList = bd.getBindingTemplate(); BindingTemplate btOut = btOutList.get(0); assertEquals(btIn.getServiceKey(), btOut.getServiceKey()); assertEquals(btIn.getBindingKey(), btOut.getBindingKey()); TckValidator.checkDescriptions(btIn.getDescription(), btOut.getDescription()); } catch(Exception e) { logger.error(e.getMessage(), e); Assert.fail("No exception should be thrown: " + e.getMessage()); } }