0
我在C++中创建了一个GSOAP客户端应用程序来调用EWS方法。我的EWS是一个https URL.I只使用正确的凭证,但我得到的回应如下。HTTP/1.1 401使用GSOAP调用EWS的未授权错误
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
下面我给出了我的代码片段。
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);}
请建议任何人可能是什么问题。
谢谢。
嗨!亚历克斯。可能是你可以帮助我。我只是无法理解如何使用gSoap EWS代理类。可能你看我的问题^ [链接](http://stackoverflow.com/questions/19487222/gsoap-exchange-web-services-connection) – IStar 2013-10-21 13:31:41