tx.begin();
if (isAuthenticated())
this.getEntityPublisher(em, body.getAuthInfo());
ServiceDetail result = new ServiceDetail();
List<String> serviceKeyList = body.getServiceKey();
for (String serviceKey : serviceKeyList) {
org.apache.juddi.model.BusinessService modelBusinessService = null;
try {
modelBusinessService = em.find(org.apache.juddi.model.BusinessService.class, serviceKey);
} catch (ClassCastException e){}
if (modelBusinessService == null)
throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.ServiceNotFound", serviceKey));
org.uddi.api_v3.BusinessService apiBusinessService = new org.uddi.api_v3.BusinessService();
MappingModelToApi.mapBusinessService(modelBusinessService, apiBusinessService);
result.getBusinessService().add(apiBusinessService);
}
tx.commit();
long procTime = System.nanoTime() - startTime;
serviceCounter.update(InquiryQuery.GET_SERVICEDETAIL, QueryStatus.SUCCESS, procTime);