0

I created a GSOAP client application in c++ for invoking EWS methods. My EWS is a https URL.I am using correct credentials only but I get the response as follows.

HTTP/1.1 401 Unauthorized  
Cache-Control: private  
Server: Microsoft-IIS/7.5  
X-AspNet-Version: 2.0.50727  
Set-Cookie: exchangecookie=b56b1f57339240a88983be18ce6a50ad; expires=Wed, 30-Jan-2013      10:59:16 GMT; path=/; HttpOnly  
WWW-Authenticate: Negotiate  
WWW-Authenticate: NTLM   
X-Powered-By: ASP.NET  
Date: Mon, 30 Jan 2012 10:59:16 GMT  
Connection: close  
Content-Length: 0  

Below I have given my code snippet.

ExchangeServiceBindingProxy *proxy =  new ExchangeServiceBindingProxy();  
proxy->soap_endpoint = "https://xxxx/EWS/exchange.asmx";  
proxy->userid = "xxxxx";  
proxy->passwd= "xxxxx";  
proxy->recv_timeout = 300;  
proxy->send_timeout = 300;  
proxy->version = ns3__ExchangeVersionType__Exchange2010;  
soap_ssl_init();  
if (soap_ssl_client_context(proxy,SOAP_SSL_NO_AUTHENTICATION, NULL, NULL, NULL,NULL,NULL)){ exit(1);}

Please suggest anyone what could be the problem.

Thanks.

Some programmer dude
  • 400,186
  • 35
  • 402
  • 621
user369287
  • 692
  • 8
  • 28

1 Answers1

0

Recompile the source code with cc -DWITH_NTLM (or /DWITH_NTLM on win) to enable the gSOAP NTLM authentication protocol.

Dr. Alex RE
  • 1,772
  • 1
  • 15
  • 23
  • Hi! Alex. May be you can help me. I just can`t understand how to work with gSoap EWS proxy classes. May you look my question^ [link](http://stackoverflow.com/questions/19487222/gsoap-exchange-web-services-connection) – IStar Oct 21 '13 at 13:31