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

update WSDL resource files to latest Exchange2013_SP1 and add examples #266

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

kroky
Copy link

@kroky kroky commented Oct 30, 2024

The cached wsdl resource files (services and messages/types schema) were fixed at 2010 SP2 version. According to this page: https://learn.microsoft.com/en-us/exchange/client-developer/exchange-web-services/ews-schema-versions-in-exchange latest version is 2013 SP1 which includes some operations like ArchiveItems.

This MR updates the cached schema files and adds a couple of more advanced examples:

  • searching, sorting and pagination of email folder results
  • archiving an item

@marclaporte
Copy link

@Garethp we need you :-) ("This workflow requires approval from a maintainer")

Copy link
Owner

@Garethp Garethp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks really good! I've left two very minor suggestions that I think will make the examples a bit easier to read through. Once they're taken care of and the checks are green, I'm more than happy to merge this in!

$request = [
'ArchiveSourceFolderId' => (new DistinguishedFolderIdType(DistinguishedFolderIdNameType::INBOX))->toArray(true),
'ItemIds' => [
'ItemId' => array_map(function($itemId) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might be a touch clearer if you just had an array of the two items, rather than passing them through array_map. This will also clear up the code style error that's being thrown by phpcs

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, made that change.


$ews = ExchangeWebServices::withUsernameAndPassword('server', 'username', 'password');

$request = array(
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you could add a quick explanation of what messages are being searched for, I think this example would flow more easily

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@kroky
Copy link
Author

kroky commented Nov 19, 2024

Pushed one more commit fixing the unit tests. It seems PHP SoapClient doesn't support the Exchange wsdl substitution groups, so I had to expand those like it used to be in the former types.xsd.

@kroky
Copy link
Author

kroky commented Dec 9, 2024

@Garethp do the most recent updates seem OK to you? Maybe we can run the pipeline and see if tests are fine now - I've pushed a commit that fixes them.

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

Successfully merging this pull request may close these issues.

3 participants