use of org.hisp.dhis.web.ohie.common.domain.soap.Fault in project dhis2-core by dhis2.
the class CsdController method soapError.
@ExceptionHandler
public void soapError(SoapException ex, HttpServletResponse response) throws JAXBException, IOException {
Envelope envelope = new Envelope();
envelope.setHeader(null);
envelope.getBody().setFault(new Fault());
envelope.getBody().getFault().getCode().getValue().setValue(ex.getFaultCode());
envelope.getBody().getFault().getReason().getText().setValue(ex.getMessage());
response.setContentType(SOAP_CONTENT_TYPE);
marshaller.marshal(envelope, response.getOutputStream());
}
Aggregations