Closed TueCN closed 6 years ago
Now all SOAP faults should have a description of what went wrong.
Example response:
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
<env:Header xmlns:env="http://www.w3.org/2003/05/soap-envelope"/>
<soap:Body>
<soap:Fault>
<soap:Code>
<soap:Value>soap:Sender</soap:Value>
</soap:Code>
<soap:Reason>
<soap:Text xml:lang="da-DK">ID kortet har en ugyldig type.</soap:Text>
</soap:Reason>
<soap:Detail>
<medcom:FaultCode xmlns:medcom="http://www.medcom.dk/dgws/2006/04/dgws-1.0.xsd">invalid_idcard</medcom:FaultCode>
</soap:Detail>
</soap:Fault>
</soap:Body>
</soap:Envelope>
Note: The locale of the reason text is set to the server's locale (which is da-DK at the moment). However, reason text might at times be in English (exceptions generated by libraries), therefore you cannot rely on the locale to determine what language the error text is written in.
As seen in #49, we currently return a generic error response when signature is invalid
This response should be updated to comply with DGWS, Soap, and WS-Security standards