try {
tx.begin();
UddiEntityPublisher publisher = this.getEntityPublisher(em, body.getAuthInfo());
ValidatePublish validator = new ValidatePublish(publisher);
validator.validateSaveService(em, body, null);
ServiceDetail result = new ServiceDetail();
List<org.uddi.api_v3.BusinessService> apiBusinessServiceList = body.getBusinessService();
for (org.uddi.api_v3.BusinessService apiBusinessService : apiBusinessServiceList) {
org.apache.juddi.model.BusinessService modelBusinessService = new org.apache.juddi.model.BusinessService();
org.apache.juddi.model.BusinessEntity modelBusinessEntity = new org.apache.juddi.model.BusinessEntity();
modelBusinessEntity.setEntityKey(apiBusinessService.getBusinessKey());
MappingApiToModel.mapBusinessService(apiBusinessService, modelBusinessService, modelBusinessEntity);
setOperationalInfo(em, modelBusinessService, publisher, false);
em.persist(modelBusinessService);
result.getBusinessService().add(apiBusinessService);
validator.validateSaveServiceMax(em, modelBusinessService.getBusinessEntity().getEntityKey());
}
tx.commit();
long procTime = System.nanoTime() - startTime;