try {
tx.begin();
UddiEntityPublisher publisher = this.getEntityPublisher(em, body.getAuthInfo());
ValidatePublish validator = new ValidatePublish(publisher);
validator.validateSaveBinding(em, body, null);
BindingDetail result = new BindingDetail();
List<org.uddi.api_v3.BindingTemplate> apiBindingTemplateList = body.getBindingTemplate();
for (org.uddi.api_v3.BindingTemplate apiBindingTemplate : apiBindingTemplateList) {
org.apache.juddi.model.BindingTemplate modelBindingTemplate = new org.apache.juddi.model.BindingTemplate();
org.apache.juddi.model.BusinessService modelBusinessService = new org.apache.juddi.model.BusinessService();
modelBusinessService.setEntityKey(apiBindingTemplate.getServiceKey());
MappingApiToModel.mapBindingTemplate(apiBindingTemplate, modelBindingTemplate, modelBusinessService);
setOperationalInfo(em, modelBindingTemplate, publisher, false);
em.persist(modelBindingTemplate);
result.getBindingTemplate().add(apiBindingTemplate);
validator.validateSaveBindingMax(em, modelBindingTemplate.getBusinessService().getEntityKey());
}
tx.commit();
long procTime = System.nanoTime() - startTime;
serviceCounter.update(PublicationQuery.SAVE_BINDING,