Help with Exchange 2010 EWS (API) and/or PHP's NuSOAP library?

前端 未结 1 1900
执笔经年
执笔经年 2021-01-15 02:25

Just to be clear before continuing: using PHP\'s built-in SOAP class is unfortunately not an option here (production server\'s PHP is not built with it, and won\'t be).

1条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-15 03:29

    There's a few things you'll want to look at here.

    1. There's an error in your call to the actual soap_client. You defined the endpoint in a variable called $ews_url, but then called the constructor with $service.

    2. Why are you adding a string to a string in your $xml variable - perhaps in your haste you meant to concatenate instead? (operators: + vs .)

    3. Using the following Wiki information directed to working with EWS in Java, it seems that Microsoft has yet again blundered in their implementation of a common protocol. The modification of types.xsd in this Wiki actually causes a problem, so ignore that change, but downloading a local copy of Services.wsdl and modifying it to point to your own server seems to work properly. http://www.bedework.org/trac/bedework/wiki/ExchangeWSlink text

    The following code should work, so long as you have downloaded a local copy of your types.xsd, messages.xsd, and Services.wsdl - and modified the Services.wsdl file to add the required information relevant to your server. Make sure the local copies of those files are in the same folder on your server.

    setCredentials($username, $password, 'ntlm');
    
        $xml  = 'call($operation, $xml);
        echo '
    '; print_r($result); echo '
    '; ?>

    The solution all seems to stem from having a local copy of the main SOAP reference files, and fixing the Services.wsdl file. If you had access to the Exchange server, you might be able to modify the Services.wsdl file and everything could have worked as expected without all of this hassle. I cannot verify this, unfortunately.

    0 讨论(0)
提交回复
热议问题