eeyoreeco
11 years agoOccasional Contributor
Throw Exception on First Error And Stops
Hi All,
Please help me with this one. Usually when an Error (1st) is being encountered the validation of the other parameters stops.
Just like in my sample request and the fault string below. Is there any way so that all the parameter will be validated.
In this case I want to see that both "FromCurrency" and "ToCurrency" to be validated in just one run of request. Thanks for the help.
REQUEST:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://www.webserviceX.NET/">
<soapenv:Header/>
<soapenv:Body>
<web:ConversionRate>
<web:FromCurrency>BBB</web:FromCurrency>
<web:ToCurrency>AAA</web:ToCurrency>
</web:ConversionRate>
</soapenv:Body>
</soapenv:Envelope>
FAULT STRING:
<faultstring>System.Web.Services.Protocols.SoapException: Server was unable to read request. ---> System.InvalidOperationException: There is an error in XML document (5, 50). ---> System.InvalidOperationException: Instance validation error: 'BBB' is not a valid value for Currency.
Please help me with this one. Usually when an Error (1st) is being encountered the validation of the other parameters stops.
Just like in my sample request and the fault string below. Is there any way so that all the parameter will be validated.
In this case I want to see that both "FromCurrency" and "ToCurrency" to be validated in just one run of request. Thanks for the help.
REQUEST:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://www.webserviceX.NET/">
<soapenv:Header/>
<soapenv:Body>
<web:ConversionRate>
<web:FromCurrency>BBB</web:FromCurrency>
<web:ToCurrency>AAA</web:ToCurrency>
</web:ConversionRate>
</soapenv:Body>
</soapenv:Envelope>
FAULT STRING:
<faultstring>System.Web.Services.Protocols.SoapException: Server was unable to read request. ---> System.InvalidOperationException: There is an error in XML document (5, 50). ---> System.InvalidOperationException: Instance validation error: 'BBB' is not a valid value for Currency.