-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
All examples render an error "The specified server version is invalid" #44
Comments
Huh. You're right, my documentation is wrong. I recently changed it to default to Exchange 2010. Can you do a |
The result of
which strikes me as very odd, since I was always assuming that the number between parentheses denoted the number of characters for the string that followed. Is this at all helpful? |
Btw : I just found out that my exchange 2007 server is having an identity crisis and thinks it's Exchange 2013: [https://ibin.co/2k2rKQ738jGA.jpg] How can I change this property? |
Another thing : If I change the server version in the php script to Exchange2007SP1, as user teadawg also had to do in (now closed) issue #41 (Direct link to the : #41 (comment) ) something changes. Changing the 3 to a 1, there's still a Fatal (SOAP-related) Error, but it becomes a different one; it now is about failed schema validation:
I don't know if you're actually supposed to browse to that URL (http://schemas.microsoft.com/exchange/services/2006/types:DistinguishedFolderIdNameType), but its HTML response isn't what I'd expect:
In any case, thanks for taking some time out of your schedule to look in to this. Best regards, |
Well... your server is being weird. As for the result of your As for the URL, it's not meant to be visitable, but it's rather like an identifier. It's a namespace for XML. That being said, it looks like you're trying to use the value If you're not specifically typing in |
Were you able to solve this issue? |
Is this issue still bothering you, or were you able to work through it? |
I'm sorry, I thought I'd responded already, but apparently my comment was not submitted at that time. Indeed, I had replaced "Calendar" with some other values while testing when the server version was still Regarding the need to input the "wrong" server version: Is this a bug in your code? or is this an Exchange declaration problem? Best regards, |
Thanks for reminding me about that. I had forgotten that was the original issue, as opposed to the naming. It appears to be my fault. When I originally forked from So there is no such thing as Exchange 2007 SP2 and SP3 for EWS. It looks like while SP2 and SP3 were released with bug fixes and so on, the API behind EWS didn't change, so there were no new versions of the Schema to be released. I hadn't noticed this, because I've been developing against a 2010 server, a 2013 server and now Office 365. In my next release I'll be removing those constants that don't actually exist. Thanks for pointing that out. |
After some struggle and online research I managed to get the autoloading correct by using Composer, so no more "Class not found" errors.
After this first success, I wanted to try some of the examples (examples/basic/quickstart.php seemed like a good starting point), so I add this at the top to make the autoloading happen:
require_once "../../vendor/autoload.php";
after which my browser takes quite a long time to reload the page (so I guess something is happening in communicating to the Exchange server?) only to give me a 500 Error.
/var/log/apache2/error.log tells me that SOAP thinks "The specified server version is invalid":
I altered the call to API::withUsernameAndPassword() with my domain credentials of course.
When I google "The specified server version is invalid" I get quite a few results that all have to do with Windows development (.NET, C#, VBA, PowerShell) failing to connect to an Exchange environment.
The documentation states under "Usage" that the server version "Defaults to Exchange 2007".
However if I do this:
I get a mapping of an object of type "garethp\ews\API". In that text dump, when I do a find on the string "version", I find the following 2 properties set to "Exchange2010":
...
I added a 4th parameter to API::withUsernameAndPassword() to look like this:
$api = API::withUsernameAndPassword('EXCHANGESERVER', 'DOMAIN\MYUSERNAME', 'PASSWORDIMNOTTELLINGYOU', Array("version" => 'Exchange2007_SP3' ));
Which corrects the information in the garethp\ews\API object, but when I let the script load entirely, I still get
PHP Fatal error: Uncaught SoapFault exception: [soap:Client] The specified server version is invalid. in /var/www/html/php-ews-master/src/API/NTLMSoapClient.php:127
At this point I'm kinda stuck, because I cannot get any of the examples to work. I double-checked my version number on the exchange server, which is 08.03.0379.002 ( = RU14 for Exchange 2007 SP3 accoording to Microsoft TechNet ) , So I'm pretty sure that I DO have the valid server version, opposite to what the SoapClient->__call() method in NTLMSoapClient.php tells me.
Any suggestions are more than welcome.
Best regards,
JB
The text was updated successfully, but these errors were encountered: