I have an applet that connects to a couple different exchange servers. A certain part of this applet will launch an Outlook Web Access session using credentials that were already supplied. One of the Exchange servers will be running 2003, and the other will be running 2007. The code to login to either of those is slightly different, so I have two ways of logging in depending on if it's a 2007 or 2003 server. Is there a way, using Java, that I can figure out what version of Exchange Server is running if only the IP address is known?
2 Answers
If you only have the IP you might try and call some (web)services provided by the Exchange server. It looks like Exchange 2007 provides some (web)services so you should be able to find one that gives a hint on the version or login method.
I don't know about Exchange 2003 but if you look for a service provided by Exchange 2007 and don't find it, it's not a 2007 version - and if you know you only have 2003 or 2007 you should now know that this server is an Exchange 2003 server.
To summarize:
- Ideally, look for a common service that can be called at that IP (web service or some socket) and which tells you the version.
- If there is no such service look for one that's only provided by Exchange 2007 (and up if possible). Then try to call that service and determine from the success/fail whether you have a 2007+ version or not.
Hope that helps.
Edit: Here's some additional information on how to get the version of an Exchange server using the Telnet protocol: http://www.petri.co.il/remote_version_checking.htm
For telnet connections you could use Apache Commons Net.
Exchange 2007 offers WebServices exposed via https://servername/ews/exchange.asmx.
If you get a 404 on that address, you'll know it's not an Exchange 2007.