O'Reilly logo

Inside Microsoft® Exchange Server 2007 Web Services by Huw Upshall, Mark Taylor, Ben Spain, Michael Mainer, David Sterling

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Errors and the Proxy Classes

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required