Coder Social home page Coder Social logo

Comments (5)

Garethp avatar Garethp commented on August 10, 2024

Try changing return $ews2010ItemId; to return $ews2010ItemId->getItemId()

from php-ews.

sklicek avatar sklicek commented on August 10, 2024

I get still the error that Id is malformed. Here is the message-ID to convert and the error with stacktrace:

message_id=AAMkAGNkOGRhZTMyLTBiNzAtNDhkNS05ZDhkLTg0Yjg3MDg2NTQ0NABGAAAAAACff7a4yIddSrJmA51rrq6YBwCmngR8iTVkSIs9XxAAR0L0AAAAAAEMAACmngR8iTVkSIs9XxAAR0L0AAAMM6NyAAA=

PHP Fatal error: Uncaught exception 'garethp\ews\API\Exception\ExchangeException' with message 'Id is malformed.' in C:\Bitnami\wampstack-5.5.26-0\apache2\htdocs\best_portal_test\include\vendor\garethp\php-ews\src\API\ExchangeWebServices.php:426
Stack trace:
#0 C:\Bitnami\wampstack-5.5.26-0\apache2\htdocs\best_portal_test\include\vendor
garethp\php-ews\src\API\ExchangeWebServices.php(385): garethp\ews\API\ExchangeWe
bServices->getItemsFromResponse(Object(garethp\ews\API\Message\ConvertIdResponse
MessageType))
#1 C:\Bitnami\wampstack-5.5.26-0\apache2\htdocs\best_portal_test\include\vendor
garethp\php-ews\src\API\ExchangeWebServices.php(393): garethp\ews\API\ExchangeWe
bServices->drillDownResponseLevels(Object(garethp\ews\API\Message\ConvertIdRespo
nseMessageType))
#2 C:\Bitnami\wampstack-5.5.26-0\apache2\htdocs\best_portal_test\include\vendor
garethp\php-ews\src\API\ExchangeWebServices.php(373): garethp\ews\API\ExchangeWe
bServices->drillDownResponseLevels(Object(garethp\ews\API\Message\ArrayOfRespons
eMessagesType))
#3 C:\Bitnami\w in C:\Bitnami\wampstack-5.5.26-0\apache2\htdocs\best_portal_test
\include\vendor\garethp\php-ews\src\API\ExchangeWebServices.php on line 426

from php-ews.

Garethp avatar Garethp commented on August 10, 2024

You're fetching the ItemId's straight from the server, instead of storing them in your DB. Why don't you just specify the same Exchange version in every client you create. In some places you do $ews = new ExchangeWebServices($host, $username, $password, ExchangeWebServices::VERSION_2007_SP1);, in other you don't specify the version at all. Try getting them all on the same version, and then you shouldn't need to do any conversion

from php-ews.

sklicek avatar sklicek commented on August 10, 2024

Ok thanks. Now it works! You've found my problem! My error was, that I had forgotten to give always the exchange version in my clients.

from php-ews.

Garethp avatar Garethp commented on August 10, 2024

I would highly recommend you swap all of that to my library by the way. It will cut down your code a lot

from php-ews.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.