gSoap EWS “Error 500: Internal Server Error”

前端 未结 2 1051
小鲜肉
小鲜肉 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:23

    IStar,

    First off, I'm not familiar with gSOAP nor am I familiar with this syntax. In fact, I don't expect to answer your question but I'll give it a shot. With that said, gSOAP is trying to create XML that is not supported by EWS. I think the following lines are incorrect, and there probably needs to be another line or two:

    gftRoot->FolderIds->__union_NonEmptyArrayOfBaseFolderIdsType->union_NonEmptyArrayOfBaseFolderIdsType.DistinguishedFolderId = dfit;
    gftRoot->FolderIds = (ns3__NonEmptyArrayOfBaseFolderIdsType*)dfit;
    

    I think that second line is instructing gSOAP to make the FolderIds element to be something it shouldn't be. It looks like there is some sort of conflation of the FolderIds and DistinguishedFolderId element structure.

    Perhaps it should look something like:

    ns3__NonEmptyArrayOfBaseFolderIdsType *fids = new ns3__NonEmptyArrayOfBaseFolderIdsType();
    fids->DistinguishedFolderId = dfit
    fids->__size_NonEmptyArrayOfBaseFolderIdsType = 1;
    gftRoot->FolderIds = fids;
    

提交回复
热议问题