Microsoft EWS API for Java and NTLMv2 Authentication

Microsoft has provided its JAVA API for Exchange Web Services (EWS) http://archive.msdn.microsoft.com/ewsjavaapi

However the Apache HttpClient it used couldn’t pass NLTMv2 authentication. In the provided library it does use Samba JCIFS for NTLMv2 authentication, but the flags it uses are wrong.

Original Code:

Apache HttpClient website has provided way to use JCIFS for NTLM: http://hc.apache.org/httpcomponents-client-4.2.x/ntlm.html

We have modified EWS API accordingly: