none
WWSAPI with EWS RRS feed

  • Question

  • I was wondering if anyone had some WWSAPI experience with Exchange Web Services. Any examples to share?
    Wednesday, July 22, 2009 2:29 AM

Answers

  • Finally got things to work. The key was setting up the SOAP version, NTLM authentication, ignoring a specific SSL error and bumping up the heap size. The original problem I had was nothing related to EWS, but related to a feeble and improper attempt to set up NTLM. Code snippet in case anyone is interested. This is promising as I have been interested in consuming EWS natively.

    int _tmain(int argc, _TCHAR* argv[])
    {
        HRESULT hr = NOERROR;
        WS_ERROR* error = NULL;
        WS_HEAP* heap = NULL;
        WS_SERVICE_PROXY* proxy = NULL;

        WS_CHANNEL_PROPERTY channelProperties[4]; // hold up to 4 channel properties
        ULONG channelPropertyCount = 0;

        WS_ENVELOPE_VERSION soapVersion = WS_ENVELOPE_VERSION_SOAP_1_1;
        channelProperties[channelPropertyCount].id = WS_CHANNEL_PROPERTY_ENVELOPE_VERSION;
        channelProperties[channelPropertyCount].value = &soapVersion;
        channelProperties[channelPropertyCount].valueSize = sizeof(soapVersion);
        channelPropertyCount++;

        WS_ADDRESSING_VERSION addressingVersion = WS_ADDRESSING_VERSION_TRANSPORT;
        channelProperties[channelPropertyCount].id = WS_CHANNEL_PROPERTY_ADDRESSING_VERSION;
        channelProperties[channelPropertyCount].value = &addressingVersion ;
        channelProperties[channelPropertyCount].valueSize = sizeof(addressingVersion );
        channelPropertyCount++;

        DWORD dwWS_HTTP_HEADER_AUTH_SCHEME_NEGOTIATE = WS_HTTP_HEADER_AUTH_SCHEME_NEGOTIATE;
        WS_SECURITY_BINDING_PROPERTY rgSecBindingProp[1];
        rgSecBindingProp[0].id = WS_SECURITY_BINDING_PROPERTY_HTTP_HEADER_AUTH_SCHEME;
        rgSecBindingProp[0].valueSize = sizeof(DWORD);
        rgSecBindingProp[0].value = (void*)&dwWS_HTTP_HEADER_AUTH_SCHEME_NEGOTIATE;

        WS_STRING_WINDOWS_INTEGRATED_AUTH_CREDENTIAL intAuthCredential = {}; // zero out the struct
        WS_STRING domainName = WS_STRING_VALUE(L"domain");
        WS_STRING userName = WS_STRING_VALUE(L"username");
        WS_STRING passWord = WS_STRING_VALUE(L"password");
        intAuthCredential.credential.credentialType = WS_STRING_WINDOWS_INTEGRATED_AUTH_CREDENTIAL_TYPE;
        intAuthCredential.domain = domainName;
        intAuthCredential.username = userName;
        intAuthCredential.password = passWord;

        WS_HTTP_HEADER_AUTH_SECURITY_BINDING authBinding = {};
        authBinding.binding.bindingType = WS_HTTP_HEADER_AUTH_SECURITY_BINDING_TYPE;
        authBinding.clientCredential = &intAuthCredential.credential;
        authBinding.binding.properties = rgSecBindingProp;
        authBinding.binding.propertyCount = 1;

        //ignore some ssl errors
        DWORD dwIgnoreCnSertValue = WS_CERT_FAILURE_CN_MISMATCH;
        WS_SECURITY_BINDING_PROPERTY rgSslProp[1];
        rgSslProp[0].id = WS_SECURITY_BINDING_PROPERTY_CERT_FAILURES_TO_IGNORE;
        rgSslProp[0].valueSize = sizeof(DWORD);
        rgSslProp[0].value = (void*)&dwIgnoreCnSertValue;

        // declare and initialize an SSL transport security binding
        WS_SSL_TRANSPORT_SECURITY_BINDING sslBinding = {}; // zero out the struct
        sslBinding.binding.bindingType = WS_SSL_TRANSPORT_SECURITY_BINDING_TYPE; // set the binding type
        sslBinding.binding.properties = rgSslProp;
        sslBinding.binding.propertyCount =1;

        
        // declare and initialize the array of all security bindings
        WS_SECURITY_BINDING* securityBindings[2] = { &sslBinding.binding, &authBinding.binding };
        
        // declare and initialize the security description
        WS_SECURITY_DESCRIPTION securityDescription = {}; // zero out the struct
        securityDescription.securityBindings = securityBindings;
        securityDescription.securityBindingCount = WsCountOf(securityBindings);
        securityDescription.properties = NULL;
        securityDescription.propertyCount = 0;


        int result = 0;
        WS_ENDPOINT_ADDRESS address = {};
        WS_STRING url= WS_STRING_VALUE(L"httpS://10.93.239.51/ews/Exchange.asmx");
        address.url = url;

        // Create an error object for storing rich error information
        hr = WsCreateError(
            NULL,
            0,
            &error);
        if (FAILED(hr))
        {
           return hr;
        }

        // Create a heap to store deserialized data
        hr = WsCreateHeap(
            /*maxSize*/ 8192,
            /*trimSize*/ 512,
            NULL,
            0,
            &heap,
            error);
        if (FAILED(hr))
        {
            return hr;
        }

        // Create the proxy
        hr = WsCreateServiceProxy(
                WS_CHANNEL_TYPE_REQUEST,
                WS_HTTP_CHANNEL_BINDING,
                &securityDescription,
                NULL,
                0,
                channelProperties,
                channelPropertyCount,
                &proxy,
                error);
        if (FAILED(hr))
        {
            return hr;
        }

         hr = WsOpenServiceProxy(
            proxy,
            &address,
            NULL,
            error);
        if (FAILED(hr))
        {
             return hr;
        }
        
        ResolveNamesType ReqType;    
        ResolveNamesType_Init(&ReqType);
        
        ReqType.UnresolvedEntry = L"steve";
        ReqType.SearchScope = ResolveNamesSearchScopeTypeActiveDirectory;
        ReqType.ReturnFullContactData = true;
        ReqType.ParentFolderIds = NULL;
        ReqType.ParentFolderIdsCount = 0;

        ResolveNamesResponseType* pRespType;

        hr = ExchangeServiceBinding_ResolveNames(    proxy,
                                                    &ReqType,
                                                    &pRespType,
                                                    heap,
                                                    NULL,
                                                    0,
                                                    NULL,
                                                    error);

        PrintError(hr, error);
        return 0;
    }
    Wednesday, July 22, 2009 10:02 PM

All replies

  • Hi Steve,

    I built a sample for EWS on Exchange 2007 sometime ago. It was pretty straightforward. Just download WSDL and building a proxy. I can try to find the sample if it still around and post it.  But you should just give it a try and if you hit any issues, just post them here.

    Thanks,
    Nikola
    Nikola Dudar is the Program Manager for Windows Web Services API team. This post is provided "AS IS" with no warranties, and confer no rights. Use of any samples is subject to the terms specified at http://www.microsoft.com/ info/cpyright.htm
    Wednesday, July 22, 2009 4:34 AM
  • Thanks Nikola-

    I should definitely elaborate ; )

    I was able to get the SDK and server update. I started with WWSAPI using a web service originally created as an ATL web service from DevStudio2005. Once I got the SOAP version set correctly, everything worked like a champ. I then moved onto attempting to consume EWS. I was able to process the WSDL just fine and I figured the EWS "ResolveNames" was innocuous enough to try to call. Well, I think the problem is that I just don't know what the heck I am doing - the EWS API appears to be a bit more complex. I just keep gettting E_INVALIDARG upon trying to call "ResolveNames". Any pointers are appreciated.

    int _tmain(int argc, _TCHAR* argv[])
    {
        HRESULT hr = NOERROR;
        WS_ERROR* error = NULL;
        WS_HEAP* heap = NULL;
        WS_SERVICE_PROXY* proxy = NULL;

        WS_STRING_USERNAME_CREDENTIAL usernameCredential = {}; // zero out the struct
        WS_STRING userName = WS_STRING_VALUE(L"domain\\username");
        WS_STRING passWord = WS_STRING_VALUE(L"password");
        usernameCredential.credential.credentialType = WS_STRING_USERNAME_CREDENTIAL_TYPE; // set the credential type
        usernameCredential.username = userName;
        usernameCredential.password = passWord;

        WS_CHANNEL_PROPERTY channelProperties[4]; // hold up to 4 channel properties
        ULONG channelPropertyCount = 0;

        WS_ENVELOPE_VERSION soapVersion = WS_ENVELOPE_VERSION_SOAP_1_1;
        channelProperties[channelPropertyCount].id = WS_CHANNEL_PROPERTY_ENVELOPE_VERSION;
        channelProperties[channelPropertyCount].value = &soapVersion;
        channelProperties[channelPropertyCount].valueSize = sizeof(soapVersion);
        channelPropertyCount++;

        WS_ADDRESSING_VERSION addressingVersion = WS_ADDRESSING_VERSION_TRANSPORT;
        channelProperties[channelPropertyCount].id = WS_CHANNEL_PROPERTY_ADDRESSING_VERSION;
        channelProperties[channelPropertyCount].value = &addressingVersion ;
        channelProperties[channelPropertyCount].valueSize = sizeof(addressingVersion );
        channelPropertyCount++;
       

        // declare and initialize a username message security binding
        WS_USERNAME_MESSAGE_SECURITY_BINDING usernameBinding = {}; // zero out the struct
        usernameBinding.binding.bindingType = WS_USERNAME_MESSAGE_SECURITY_BINDING_TYPE; // set the binding type
        usernameBinding.bindingUsage = WS_SUPPORTING_MESSAGE_SECURITY_USAGE; // set the binding usage
        usernameBinding.clientCredential = &usernameCredential.credential;

        //ignore some ssl errors
        DWORD dwIgnoreCnSertValue = WS_CERT_FAILURE_CN_MISMATCH;
        WS_SECURITY_BINDING_PROPERTY SecProp[2];
        SecProp[0].id = WS_SECURITY_BINDING_PROPERTY_CERT_FAILURES_TO_IGNORE;
        SecProp[0].valueSize = sizeof(DWORD);
        SecProp[0].value = (void*)&dwIgnoreCnSertValue;


        //support ntlm
        DWORD dwNtlm = WS_HTTP_HEADER_AUTH_SCHEME_NTLM;
        SecProp[1].id = WS_SECURITY_BINDING_PROPERTY_HTTP_HEADER_AUTH_SCHEME;
        SecProp[1].valueSize = sizeof(DWORD);
        SecProp[1].value = (void*)&dwNtlm;


        // declare and initialize an SSL transport security binding
        WS_SSL_TRANSPORT_SECURITY_BINDING sslBinding = {}; // zero out the struct
        sslBinding.binding.bindingType = WS_SSL_TRANSPORT_SECURITY_BINDING_TYPE; // set the binding type
        sslBinding.binding.properties = SecProp;
        sslBinding.binding.propertyCount =2;

       
        // declare and initialize the array of all security bindings
        WS_SECURITY_BINDING* securityBindings[2] = { &sslBinding.binding, &usernameBinding.binding };
       
        // declare and initialize the security description
        WS_SECURITY_DESCRIPTION securityDescription = {}; // zero out the struct
        securityDescription.securityBindings = securityBindings;
        securityDescription.securityBindingCount = WsCountOf(securityBindings);


        int result = 0;
        WS_ENDPOINT_ADDRESS address = {};
        WS_STRING url= WS_STRING_VALUE(L"https://10.93.239.51/ews/Exchange.asmx");
        address.url = url;

        // Create an error object for storing rich error information
        hr = WsCreateError(
            NULL,
            0,
            &error);
        if (FAILED(hr))
        {
           return hr;
        }

        // Create a heap to store deserialized data
        hr = WsCreateHeap(
            /*maxSize*/ 2048,
            /*trimSize*/ 512,
            NULL,
            0,
            &heap,
            error);
        if (FAILED(hr))
        {
            return hr;
        }

        // Create the proxy
        hr = WsCreateServiceProxy(
                WS_CHANNEL_TYPE_REQUEST,
                WS_HTTP_CHANNEL_BINDING,
                &securityDescription,
                NULL,
                0,
                NULL,//channelProperties,
                0,//channelPropertyCount,
                &proxy,
                error);
        if (FAILED(hr))
        {
            return hr;
        }

         hr = WsOpenServiceProxy(
            proxy,
            &address,
            NULL,
            error);
        if (FAILED(hr))
        {
             return hr;
        }
       
        ResolveNamesType ReqType;   
        ResolveNamesType_Init(&ReqType); //i suspect I should call that?

       
        ReqType.UnresolvedEntry = L"steve";
        ReqType.SearchScope = ResolveNamesSearchScopeTypeActiveDirectory;
        ReqType.ReturnFullContactData = true;
        ReqType.ParentFolderIds = NULL;
        ReqType.ParentFolderIdsCount = 0;

        ResolveNamesResponseType* pRespType = NULL;

        hr = ExchangeServiceBinding_ResolveNames(    proxy,
                                                    &ReqType,
                                                    &pRespType,
                                                    heap,
                                                    NULL,
                                                    0,
                                                    NULL,
                                                    error);
    Wednesday, July 22, 2009 6:59 PM
  • Looks like this was incorrect...

    //support ntlm
        DWORD dwNtlm = WS_HTTP_HEADER_AUTH_SCHEME_NTLM;
        SecProp[1].id = WS_SECURITY_BINDING_PROPERTY_HTTP_HEADER_AUTH_SCHEME;
        SecProp[1].valueSize = sizeof(DWORD);
        SecProp[1].value = (void*)&dwNtlm;

    It's now actually hitting the server and failing differently ; ) More investigation....
    Wednesday, July 22, 2009 7:22 PM
  • Finally got things to work. The key was setting up the SOAP version, NTLM authentication, ignoring a specific SSL error and bumping up the heap size. The original problem I had was nothing related to EWS, but related to a feeble and improper attempt to set up NTLM. Code snippet in case anyone is interested. This is promising as I have been interested in consuming EWS natively.

    int _tmain(int argc, _TCHAR* argv[])
    {
        HRESULT hr = NOERROR;
        WS_ERROR* error = NULL;
        WS_HEAP* heap = NULL;
        WS_SERVICE_PROXY* proxy = NULL;

        WS_CHANNEL_PROPERTY channelProperties[4]; // hold up to 4 channel properties
        ULONG channelPropertyCount = 0;

        WS_ENVELOPE_VERSION soapVersion = WS_ENVELOPE_VERSION_SOAP_1_1;
        channelProperties[channelPropertyCount].id = WS_CHANNEL_PROPERTY_ENVELOPE_VERSION;
        channelProperties[channelPropertyCount].value = &soapVersion;
        channelProperties[channelPropertyCount].valueSize = sizeof(soapVersion);
        channelPropertyCount++;

        WS_ADDRESSING_VERSION addressingVersion = WS_ADDRESSING_VERSION_TRANSPORT;
        channelProperties[channelPropertyCount].id = WS_CHANNEL_PROPERTY_ADDRESSING_VERSION;
        channelProperties[channelPropertyCount].value = &addressingVersion ;
        channelProperties[channelPropertyCount].valueSize = sizeof(addressingVersion );
        channelPropertyCount++;

        DWORD dwWS_HTTP_HEADER_AUTH_SCHEME_NEGOTIATE = WS_HTTP_HEADER_AUTH_SCHEME_NEGOTIATE;
        WS_SECURITY_BINDING_PROPERTY rgSecBindingProp[1];
        rgSecBindingProp[0].id = WS_SECURITY_BINDING_PROPERTY_HTTP_HEADER_AUTH_SCHEME;
        rgSecBindingProp[0].valueSize = sizeof(DWORD);
        rgSecBindingProp[0].value = (void*)&dwWS_HTTP_HEADER_AUTH_SCHEME_NEGOTIATE;

        WS_STRING_WINDOWS_INTEGRATED_AUTH_CREDENTIAL intAuthCredential = {}; // zero out the struct
        WS_STRING domainName = WS_STRING_VALUE(L"domain");
        WS_STRING userName = WS_STRING_VALUE(L"username");
        WS_STRING passWord = WS_STRING_VALUE(L"password");
        intAuthCredential.credential.credentialType = WS_STRING_WINDOWS_INTEGRATED_AUTH_CREDENTIAL_TYPE;
        intAuthCredential.domain = domainName;
        intAuthCredential.username = userName;
        intAuthCredential.password = passWord;

        WS_HTTP_HEADER_AUTH_SECURITY_BINDING authBinding = {};
        authBinding.binding.bindingType = WS_HTTP_HEADER_AUTH_SECURITY_BINDING_TYPE;
        authBinding.clientCredential = &intAuthCredential.credential;
        authBinding.binding.properties = rgSecBindingProp;
        authBinding.binding.propertyCount = 1;

        //ignore some ssl errors
        DWORD dwIgnoreCnSertValue = WS_CERT_FAILURE_CN_MISMATCH;
        WS_SECURITY_BINDING_PROPERTY rgSslProp[1];
        rgSslProp[0].id = WS_SECURITY_BINDING_PROPERTY_CERT_FAILURES_TO_IGNORE;
        rgSslProp[0].valueSize = sizeof(DWORD);
        rgSslProp[0].value = (void*)&dwIgnoreCnSertValue;

        // declare and initialize an SSL transport security binding
        WS_SSL_TRANSPORT_SECURITY_BINDING sslBinding = {}; // zero out the struct
        sslBinding.binding.bindingType = WS_SSL_TRANSPORT_SECURITY_BINDING_TYPE; // set the binding type
        sslBinding.binding.properties = rgSslProp;
        sslBinding.binding.propertyCount =1;

        
        // declare and initialize the array of all security bindings
        WS_SECURITY_BINDING* securityBindings[2] = { &sslBinding.binding, &authBinding.binding };
        
        // declare and initialize the security description
        WS_SECURITY_DESCRIPTION securityDescription = {}; // zero out the struct
        securityDescription.securityBindings = securityBindings;
        securityDescription.securityBindingCount = WsCountOf(securityBindings);
        securityDescription.properties = NULL;
        securityDescription.propertyCount = 0;


        int result = 0;
        WS_ENDPOINT_ADDRESS address = {};
        WS_STRING url= WS_STRING_VALUE(L"httpS://10.93.239.51/ews/Exchange.asmx");
        address.url = url;

        // Create an error object for storing rich error information
        hr = WsCreateError(
            NULL,
            0,
            &error);
        if (FAILED(hr))
        {
           return hr;
        }

        // Create a heap to store deserialized data
        hr = WsCreateHeap(
            /*maxSize*/ 8192,
            /*trimSize*/ 512,
            NULL,
            0,
            &heap,
            error);
        if (FAILED(hr))
        {
            return hr;
        }

        // Create the proxy
        hr = WsCreateServiceProxy(
                WS_CHANNEL_TYPE_REQUEST,
                WS_HTTP_CHANNEL_BINDING,
                &securityDescription,
                NULL,
                0,
                channelProperties,
                channelPropertyCount,
                &proxy,
                error);
        if (FAILED(hr))
        {
            return hr;
        }

         hr = WsOpenServiceProxy(
            proxy,
            &address,
            NULL,
            error);
        if (FAILED(hr))
        {
             return hr;
        }
        
        ResolveNamesType ReqType;    
        ResolveNamesType_Init(&ReqType);
        
        ReqType.UnresolvedEntry = L"steve";
        ReqType.SearchScope = ResolveNamesSearchScopeTypeActiveDirectory;
        ReqType.ReturnFullContactData = true;
        ReqType.ParentFolderIds = NULL;
        ReqType.ParentFolderIdsCount = 0;

        ResolveNamesResponseType* pRespType;

        hr = ExchangeServiceBinding_ResolveNames(    proxy,
                                                    &ReqType,
                                                    &pRespType,
                                                    heap,
                                                    NULL,
                                                    0,
                                                    NULL,
                                                    error);

        PrintError(hr, error);
        return 0;
    }
    Wednesday, July 22, 2009 10:02 PM
  • I am glad to hear that you were able to work out all issues. And thanks for posting the code! If you are interested in packaging this example as project on Microsoft Code Gallery, http://code.msdn.microsoft.com/, please let me know. We can work on that together offline. It will be great help to all other developers who will face the same task.
    Nikola Dudar is the Program Manager for Windows Web Services API team. This post is provided "AS IS" with no warranties, and confer no rights. Use of any samples is subject to the terms specified at http://www.microsoft.com/ info/cpyright.htm
    Friday, July 24, 2009 7:21 PM
  • Given the example above, could you help to elaborate on how to extract the data from the ResolveNamesResponseType? I've been poking around in the debugger and added this code  after the call to "ExchangeServiceBinding_ResolveNames". I don't see any information that looks like the SOAP response sent back from the server.

    for(int i = 0; i < pRespType->_base.ResponseMessages[0].u.ResolveNamesResponseMessage->_base._type->fieldCount; i++)
        {
            WS_FIELD_DESCRIPTION* pdesc = pRespType->_base.ResponseMessages[0].u.ResolveNamesResponseMessage->_base._type->fields[i];
            wprintf(    L"WS_FIELD_DESCRIPTION[%d].mapping = %d\n", i, pdesc->mapping);
            wprintf(    L"WS_FIELD_DESCRIPTION[%d].localName address = %d\n", i, pdesc->localName);
            wprintf(    L"WS_FIELD_DESCRIPTION[%d].ns address = %d\n", i, pdesc->ns);
            wprintf(    L"WS_FIELD_DESCRIPTION[%d].type = %d\n", i, pdesc->type);
            wprintf(    L"WS_FIELD_DESCRIPTION[%d].typeDescription address = %d\n", i, pdesc->typeDescription);
            wprintf(    L"WS_FIELD_DESCRIPTION[%d].offset = %d\n", i, pdesc->offset);
            wprintf(    L"WS_FIELD_DESCRIPTION[%d].options = %d\n", i, pdesc->options);
            wprintf(    L"WS_FIELD_DESCRIPTION[%d].defaultValue address = %d\n", i, pdesc->defaultValue);
            wprintf(    L"WS_FIELD_DESCRIPTION[%d].countOffset = %d\n", i, pdesc->countOffset);
            wprintf(    L"WS_FIELD_DESCRIPTION[%d].itemLocalName address = %d\n", i, pdesc->itemLocalName);
            wprintf(    L"WS_FIELD_DESCRIPTION[%d].itemNs address = %d\n", i, pdesc->itemNs);
            wprintf(    L"WS_FIELD_DESCRIPTION[%d].itemRange address = %d\n", i, pdesc->itemRange);
            wprintf( L"\n\n");
        }

    It certainly seems the request works, it's just that I don't know how to crack it on the client side. Here's the response from the srever:

    BODY{font:x-small 'Verdana';margin-right:1.5em} .c{cursor:hand} .b{color:red;font-family:'Courier New';font-weight:bold;text-decoration:none} .e{margin-left:1em;text-indent:-1em;margin-right:1em} .k{margin-left:1em;text-indent:-1em;margin-right:1em} .t{color:#990000} .xt{color:#990099} .ns{color:red} .dt{color:green} .m{color:blue} .tx{font-weight:bold} .db{text-indent:0px;margin-left:1em;margin-top:0px;margin-bottom:0px;padding-left:.3em;border-left:1px solid #CCCCCC;font:small Courier} .di{font:small Courier} .d{color:blue} .pi{color:blue} .cb{text-indent:0px;margin-left:1em;margin-top:0px;margin-bottom:0px;padding-left:.3em;font:small Courier;color:#888888} .ci{font:small Courier;color:#888888} PRE{margin:0px;display:inline}
      <? xml version="1.0" encoding="utf-8" ?>
    - < soap:Envelope xmlns:soap =" http://schemas.xmlsoap.org/soap/envelope/ " xmlns:xsi =" http://www.w3.org/2001/XMLSchema-instance " xmlns:xsd =" http://www.w3.org/2001/XMLSchema " >
    - < soap:Header >
      < t:ServerVersionInfo MajorVersion =" 8 " MinorVersion =" 1 " MajorBuildNumber =" 240 " MinorBuildNumber =" 5 " xmlns:t =" http://schemas.microsoft.com/exchange/services/2006/types " />
      </ soap:Header >
    - < soap:Body >
    - < m:ResolveNamesResponse xmlns:t =" http://schemas.microsoft.com/exchange/services/2006/types " xmlns:m =" http://schemas.microsoft.com/exchange/services/2006/messages " >
    - < m:ResponseMessages >
    - < m:ResolveNamesResponseMessage ResponseClass =" Success " >
      < m:ResponseCode > NoError </ m:ResponseCode >
    - < m:ResolutionSet TotalItemsInView =" 1 " IncludesLastItemInRange =" true " >
    - < t:Resolution >
    - < t:Mailbox >
      < t:Name > Steve Olivier </ t:Name >
      < t:EmailAddress > oliviers@mydomain.com </ t:EmailAddress >
      < t:RoutingType > SMTP </ t:RoutingType >
      < t:MailboxType > Mailbox </ t:MailboxType >
      </ t:Mailbox >
    - < t:Contact >
      < t:Culture > en-US </ t:Culture >
      < t:DisplayName > Steve Olivier </ t:DisplayName >
      < t:GivenName > Steve </ t:GivenName >
    - < t:EmailAddresses >
      < t:Entry Key =" EmailAddress1 " > SMTP:oliviers@mydomain.com </ t:Entry >
      </ t:EmailAddresses >
      < t:ContactSource > ActiveDirectory </ t:ContactSource >
      < t:Surname > Olivier </ t:Surname >
      </ t:Contact >
      </ t:Resolution >
      </ m:ResolutionSet >
      </ m:ResolveNamesResponseMessage >
      </ m:ResponseMessages >
      </ m:ResolveNamesResponse >
      </ soap:Body >
      </ soap:Envelope >

    Wednesday, July 29, 2009 9:27 PM
  • Hi Nikola,

     

    I'd really appreciate you digging out and posting your sample program. I'm really struggling to work out how to fill in the auto-generated C structures for simple operations such as ExchangeServiceBinding_GetFolder(). Also, like the original poster, I can't work out how to decode the response.

     

    Thanks,

    Steve Thresher.

    Thursday, June 10, 2010 10:30 PM
  • Hi Steve,

     

    Did you ever work out how to decode the response structures? I'm stuck in the same situation and would really appreciate any pointers you could offer.

     

    Thanks,

    Steve Thresher.

    Thursday, June 10, 2010 10:31 PM
  • Hi Steve & Steve,

    If you had figured out on how to decode this response structure, please share and post it here.

    Appreciate your help.

    Thanks,

    -PC

    Monday, October 17, 2011 8:27 PM
  • I went through the problem with an MS engineer but the solution ended up being over-complicated so I chose to just post XML to the exchange server which has worked out great.
    Monday, October 17, 2011 9:43 PM
  • Thanks Steve.

    I wonder why MS is promoting it as a C++ SOAP toolkit . 

    Meanwhile, I have started using gSoap Toolkit 2.8.3 which seems to be working well with EWS. It doesn't support Windows Authentication. So, you will have to turn on the basic authentication for the EWS application in the CAS.

    -PC

     

    Friday, October 21, 2011 4:07 PM
  • Since my last post, I have observed that gSoap (now version 2.8.7) has support for NTLM (Windows Authentication). 

    http://www.cs.fsu.edu/~engelen/soapdoc2.html#tth_sEc19.15

    http://sourceforge.net/tracker/index.php?func=detail&aid=3495388&group_id=52781&atid=468021


    Wednesday, May 2, 2012 3:12 PM
  • Hi PARCZ,

    I also want to use gSoap toolkit which will be work with EWS, so if you have any code samples of your code please tell me, or could you please advice me how to getting started with it to make a well working functionality with gSoap in C++. since i'm beginner in it, i know nothing about it, However i have to use this gSoap toolkit with C++.

    Thank you very much!!

    Tushar

    Saturday, May 23, 2015 6:53 AM
  • Hello,

    I have generated web service client from WSDL of web service using WsUtil tool of VS 2015 on windows 7 OS.

    I have use exactly above code to connect to web service with just last method change. I am calling method exposed by webservice . I am sending SOAP request but I get below error

    Failure: errorCode=0x803d0000
    An error occurred at row 1, column 321 (0x141).
    The value '' could not be parsed as a qualified name.

    I am connecting to https web service.

    previously I was connecting to this web service using staff that time I was needing client certificate.

    I am not sure how to do that with web services API's as I can not see much examples regarding that.

    Can you please help me with above error

    Wednesday, July 26, 2017 3:39 PM