Skip to content
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

Wrong exchange datetime format #29

Closed
h3 opened this issue Nov 20, 2014 · 2 comments
Closed

Wrong exchange datetime format #29

h3 opened this issue Nov 20, 2014 · 2 comments

Comments

@h3
Copy link

h3 commented Nov 20, 2014

With the latest code I now get an invalid datatype error when calling list_events.

My code runs fine with 0.5, but when I try with HEAD I get this:

<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
    <s:Fault>
        <faultcode xmlns:a="http://schemas.microsoft.com/exchange/services/2006/types">a:ErrorSchemaValidation</faultcode>
        <faultstring xml:lang="en-US">The request failed schema validation: The 'EndDate' attribute is invalid - The value '2014-11-30' is invalid according to its datatype 'http://www.w3.org/2001/XMLSchema:dateTime' - The string '2014-11-30' is not a valid XsdDateTime value.</faultstring>
        <detail>
            <e:ResponseCode xmlns:e="http://schemas.microsoft.com/exchange/services/2006/errors">ErrorSchemaValidation</e:ResponseCode>
            <e:Message xmlns:e="http://schemas.microsoft.com/exchange/services/2006/errors">The request failed schema validation.</e:Message>
            <t:MessageXml xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
            <t:LineNumber>1</t:LineNumber>
            <t:LinePosition>355</t:LinePosition>
            <t:Violation>The 'EndDate' attribute is invalid - The value '2014-11-30' is invalid according to its datatype 'http://www.w3.org/2001/XMLSchema:dateTime' - The string '2014-11-30' is not a valid XsdDateTime value.</t:Violation>
        </t:MessageXml>
    </detail>
</s:Fault>
</s:Body>
</s:Envelope>

Changing EXCHANGE_DATE_FORMAT for EXCHANGE_DATETIME_FORMAT in line 120 & 121 of soap_request.py fixes the issue for me.. but I'm not sure it's the right way to fix this.

Edit: fixed wrong line numbers

@got-root
Copy link
Contributor

Which branch are you on? This was fixed in pull request #24.

@h3
Copy link
Author

h3 commented Nov 20, 2014

That's very strange .. I forked the project 2 days ago, worked on a branch to add a feature.

Then yesterday I merged linkedin/pyexchange/master back to my fork to get the latest changes (which was only your fix if I recall). Then I merged my master to my branch, at this point both were affected by this bug.

I guess I'll have to dig to find what happened, sorry for the false report.

@h3 h3 closed this as completed Nov 20, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants