use of org.openclinica.ws.beans.ListStudySubjectsInStudyType in project OpenClinica by OpenClinica.
the class StudySubjectEndpoint method listStudySubjectsInStudy.
/**
* Use this method to list all study subjects. Scheduled event data will also be show if available.
*
* @param requestElement
* @return ListAllByStudyResponse
* @throws Exception
*/
@PayloadRoot(localPart = "listAllByStudyRequest", namespace = NAMESPACE_URI_V1)
public ListAllByStudyResponse listStudySubjectsInStudy(JAXBElement<ListStudySubjectsInStudyType> requestElement) throws Exception {
try {
ResourceBundleProvider.updateLocale(new Locale("en_US"));
ListStudySubjectsInStudyType listStudySubjectsInStudyType = requestElement.getValue();
StudyBean study = null;
try {
study = validateRequestAndReturnStudy(listStudySubjectsInStudyType.getStudyRef());
} catch (OpenClinicaSystemException e) {
e.printStackTrace();
ListAllByStudyResponse response = new ListAllByStudyResponse();
response.setResult(messages.getMessage("studySubjectEndpoint.fail", null, "Fail", locale));
response.getError().add(messages.getMessage(e.getErrorCode(), null, e.getErrorCode(), locale));
return response;
}
return mapListStudySubjectsInStudyResponse(study, messages.getMessage("studySubjectEndpoint.success", null, "Success", locale), listStudySubjectsInStudyType.getStudyRef());
} catch (Exception eee) {
eee.printStackTrace();
throw eee;
}
}
Aggregations