November 2007
Intermediate to advanced
928 pages
26h 9m
English
Now that you know what a response message is and how error information is embedded in it, how do you deal with response message errors when you are using the proxy classes? First, the response class and response code are exposed as properties on ResponseMessageType, so accessing those is quite easy. You can check the ResponseClass property if you like.
if (myResponseMessage.ResponseClass != ResponseClassType.Success)
{
// Either an error or a warning...
//
}Or you can check the ResponseCode property.
if (myResponseMessage.ResponseCode != ResponseCodeType.NoError)
{
// Either an error or a warning...
//
}You could also check ResponseClass for a value of Warning. However, the only warning Exchange Web Services exposes ...