gSoap EWS “Error 500: Internal Server Error”

前端 未结 2 1064
小鲜肉
小鲜肉 2021-01-27 10:59

I have some problems with ews(gSoap).

I have next code:

ExchangeServiceBindingProxy *proxy = new ExchangeServiceBindingProxy(endpoint.c_str());

soap *pS         


        
2条回答
  •  误落风尘
    2021-01-27 11:09

    Well, i figured out how to make it works:

    //get folder
        ns1__GetFolderType *gftRoot = new ns1__GetFolderType(); 
        gftRoot->FolderIds = new ns3__NonEmptyArrayOfBaseFolderIdsType();
        gftRoot->FolderIds->__size_NonEmptyArrayOfBaseFolderIdsType = 1; //there we specify how many folders elements in FolderIds array
        gftRoot->FolderIds->__union_NonEmptyArrayOfBaseFolderIdsType = new __ns3__union_NonEmptyArrayOfBaseFolderIdsType(); //create one element of array
        gftRoot->FolderIds->__union_NonEmptyArrayOfBaseFolderIdsType->__union_NonEmptyArrayOfBaseFolderIdsType = 2; //this indicates, which class/structure are taken from union
        gftRoot->FolderIds->__union_NonEmptyArrayOfBaseFolderIdsType->union_NonEmptyArrayOfBaseFolderIdsType.DistinguishedFolderId = dfit; //push dfit to element
        gftRoot->FolderShape = frst;
    
        __ns1__GetFolderResponse response;
    
        int ret = proxy->GetFolder(gftRoot, response);
    

提交回复
热议问题