Here is an online tool:
https://www.testexchangeconnectivity.com/
put up by Microsoft, which tests all Exchange server communications, including Outlook Anywhere, mobile/ActiveSync/Android/iPhone, etc. The downloadable tool at the following web site, seems to work better sometimes:
https://store.accessmylan.com/main/diagnostic-tools
The following two KBs, if their fix-it steps are done in order, will fix many OWA and ActiveSync problems:
A large number of things to do in case of many specific error-codes, is here:
http://www.pocketpcfaq.com/faqs/activesync/exchange_errors.php