Export to GitHub

php-ews - issue #3

Missing RequestServerVersion SOAP header


Posted on Apr 23, 2010 by Happy Camel

What steps will reproduce the problem? 1. FindFolder request with DistinguishedFolderId on publicfoldersroot and Traversal on Shallow.

Expected output: succesful response

Got soap error: The request is valid but does not specify the correct server version in the RequestServerVersion SOAP header. Ensure that the RequestServerVersion SOAP header is set with the correct RequestServerVersionValue.

Quick fix: to NTMLSOAPClient_Exchange::__construct(), I added this:

$soapHeader = new SoapHeader( 'http://schemas.microsoft.com/exchange/services/2006/types', 'RequestServerVersion Version="Exchange2007_SP1"' ); $this->__setSoapHeaders($soapHeader);

Obviously, the Exchange2007_SP1 part should be configurable.

Comment #1

Posted on Apr 23, 2010 by Quick Kangaroo

I find it odd that I haven't run into this issue before. I will verify that this is all that is required and take care of it this weekend.

Comment #2

Posted on Jun 6, 2010 by Happy Ox

Ah, this fix may work with the ExchangeImpersonation, however i'm unsure, how to impliment this on NTLMSoapClient_Exchange , any thoughts

Comment #3

Posted on Aug 30, 2011 by Massive Bear

Hi, I've attached a patch that fixes this issue (we were affected as well.)

Attachments

Comment #4

Posted on Aug 30, 2011 by Massive Bear

forgot to mention, to use the new code you need to specify the new optional exchange server version parameter to the ExchangewWebServices constructor, like so:

$ews = new ExchangeWebServices('server', 'username', 'password', EWSType_ExchangeVersionType::Exchange2007_SP1);

Comment #5

Posted on Sep 30, 2011 by Quick Kangaroo

This has been merged into the master branch. I made some changes to your patch, the biggest change being that I added the constants directly to the ExchangeWebServices class rather than adding a new class. I have also added you to the contributors file, thank you for your contribution.

Comment #6

Posted on Feb 14, 2012 by Quick Kangaroo

This issue has been moved to GitHub https://github.com/jamesiarmes/php-ews/issues/3

Status: MovedToGitHub

Labels:
Type-Defect Priority-Medium Usability