use of se.inera.intyg.clinicalprocess.healthcond.certificate.getcertificatetype.v1.GetCertificateTypeType in project webcert by sklintyg.
the class IntygServiceImpl method getIntygsTyp.
@Override
public String getIntygsTyp(String intygsId) {
GetCertificateTypeType requestType = new GetCertificateTypeType();
requestType.setIntygsId(intygsId);
try {
GetCertificateTypeResponseType responseType = getCertificateTypeService.getCertificateType(logicalAddress, requestType);
return responseType.getTyp().getCode();
} catch (WebCertServiceException e) {
LOG.error("Failed to decide on the type of certificate");
if (e.getErrorCode() == WebCertServiceErrorCodeEnum.DATA_NOT_FOUND) {
return null;
}
throw e;
}
}
Aggregations