ExchangeServiceBindingProxy *proxy = new ExchangeServiceBindingProxy("https://192.168.0.49/EWS/exchange.asmx"); soap *pSoap = proxy->soap; pSoap->userid = "user1"; pSoap->passwd = "password1"; pSoap->recv_timeout = 300; pSoap->send_timeout = 300; SOAP_ENV__Header *header = new SOAP_ENV__Header(); header->ns3__RequestServerVersion = new _ns3__RequestServerVersion(); header->ns3__RequestServerVersion->soap = pSoap; header->ns3__RequestServerVersion->Version = ns3__ExchangeVersionType__Exchange2010; pSoap->header = header; //get root folder ID ns3__DistinguishedFolderIdType *dfit = new ns3__DistinguishedFolderIdType(); dfit->Id = ns3__DistinguishedFolderIdNameType__inbox; //set the props that we want to retrieve ns3__FolderResponseShapeType *frst = new ns3__FolderResponseShapeType(); frst->BaseShape = ns3__DefaultShapeNamesType__AllProperties; //get folder ns1__GetFolderType *gftRoot = new ns1__GetFolderType(); gftRoot->FolderIds = new ns3__NonEmptyArrayOfBaseFolderIdsType(); gftRoot->FolderIds->__union_NonEmptyArrayOfBaseFolderIdsType = new __ns3__union_NonEmptyArrayOfBaseFolderIdsType(); gftRoot->FolderIds->__union_NonEmptyArrayOfBaseFolderIdsType->union_NonEmptyArrayOfBaseFolderIdsType.DistinguishedFolderId = dfit; gftRoot->FolderShape = frst; __ns1__GetFolderResponse response; int error = proxy->GetFolder(gftRoot, response);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)