diff --git a/WEBSERVICES/ZUGFeRDRESTService/Controllers/ValidationController.cs b/WEBSERVICES/ZUGFeRDRESTService/Controllers/ValidationController.cs index 291b10e3..d3a3ab61 100644 --- a/WEBSERVICES/ZUGFeRDRESTService/Controllers/ValidationController.cs +++ b/WEBSERVICES/ZUGFeRDRESTService/Controllers/ValidationController.cs @@ -131,6 +131,7 @@ namespace ZUGFeRDRESTService.Controllers _ValidationErrors = new List() { REFERENCES_Rejection_30001, + REFERENCES_Rejection_30002_1, REFERENCES_Rejection_30002, REFERENCES_Rejection_30003_1, REFERENCES_Rejection_30003_2, @@ -141,8 +142,8 @@ namespace ZUGFeRDRESTService.Controllers REFERENCES_Rejection_30005_1, REFERENCES_Rejection_30005_2, REFERENCES_Rejection_30006, - REFERENCES_Rejection_30007, REFERENCES_Rejection_30007_1, + REFERENCES_Rejection_30007, REFERENCES_Rejection_30008, REFERENCES_Rejection_30009, REFERENCES_Rejection_30010, @@ -665,7 +666,13 @@ namespace ZUGFeRDRESTService.Controllers if (_database.MSSQL.ExecuteNonQuery(oCommand)) { - string oReturnValue = (string)oCommand.Parameters["@MSG_OUTPUT"].Value; + string oReturnValue = string.Empty; + + if (oCommand.Parameters["@MSG_OUTPUT"] != null && oCommand.Parameters["@MSG_OUTPUT"].Value != null) + { + object val = oCommand.Parameters["@MSG_OUTPUT"].Value; + oReturnValue = (val == null || val is DBNull) ? string.Empty : (string)val; + } _logger.Debug("Validation Result message from DB: " + oReturnValue);