EWS Java API 1.2 – get started!
August 28th, 2014 update:
The EWS Java API is now available on GitHub as an open source project, ews-java-api. For more details, see the new blog post on https://blogs.office.com/dev.
__________________________________
The EWS Java API 1.2 is now available, with added support for functionality in Exchange Server 2010 SP2. It also includes an important update to the license terms that affects what you can do with the source code and the redistribution terms.
Feature-wise, we’ve implemented the following updates to the EWS Java API, which might be of interest to you:
- The API now targets the Exchange 2010 SP2 version of the schema.
- We've added synchronous request-response pattern implemented for handling communication with the service.
- The FullContactData option of the ResolveNames operation now includes new directory properties.
- Streaming notifications includes the following updates :
- Subscription creation no longer causes a deadlock.
- The StreamingSubscription object no longer causes a crash when the Microsoft.Exchange.Data.Storage.MailboxSession object is disposed.
- Get password expiration date functionality has been implemented.
- Logging capability for the HTTP headers is now included.
- The HTTPHeader collection now correctly populates with the response HTTP headers.
For more information about what's new in the EWS Java API 1.2, see the release notes included in the download.
In some ways, the biggest change is that we have updated the license terms to give you a bit more freedom to customize the EWS Java API. The license updates enable you, the licensee, to do the following:
- Modify the source code to fix bugs and make improvements in your own private branch of the code.
- Redistribute in binary format only, as part of your application, the EWS Java API, with any changes that you have made to the original source code.
- Submit bug fixes or source code to Microsoft. We can incorporate the fixes into future API releases, at our discretion.
As always, be sure to review the authoritative license terms for details.
Hopefully, these more flexible terms will open more possibilities for you to incorporate Exchange integration into your products. This update has been a long time coming, so start up your IDE, rev up your (private) code repository, and take off using the latest EWS Java API!
Comments
Anonymous
January 07, 2013
Thank you, Mike for this note. Any plan to support 2013 version?Anonymous
January 07, 2013
Hello EWS_user, I sure hope there are plans to support 2013 and later. You've got my vote on further development of the EWS Java API (and license terms). I'm not aware of the current plans for additional development of the EWS Java API. I will pass along your interest in seeing 2013 support. With regards, Michael Mainer Microsoft CorporationAnonymous
January 18, 2013
Hi, Thanks for the new API and the post. I found that there option to impersonate user using EWS API. Is there any way to use impersonation accessing exchange via IMAP ? or the impersonation is works only the EWS API. Thanks.Anonymous
January 29, 2013
Thanks for the API! I new thats not the write place to put questions but I simply found no other: I'm havin a problem downloading huge attachments on systemy with limited memory, since everything is loaded into memory first - even if I use IFileAttachmentHandler oder load(stream). Is there a posibility to direclty stream the attachment or the whole item to an outputstream without downloading everything to memory first? big thanks!Anonymous
February 03, 2013
I just patched it for attachment and mime-content streaming - if someone is interested send me an mail to selbitschka [at] gmail [dot] com. I also would submit it as patch if someone tells me where.Anonymous
February 05, 2013
Hello Stefan, Any bugs or proposed updates to the offical API can be submitted to ewsjavaapi@sqlserver.org. Include a problem definition, the fix description, and the modified source files. With regards, Michael Mainer Microsoft CorporationAnonymous
February 07, 2013
Hi Michael Thanks so far. How do I get a calendar that does not belong to my own account? Meaning that I want to know the Appointments of a "meeting room" within a timeframe. I guess the "meeting room" is a normal user that has a calendar. But I don't know how to connect to it. Thanks MartinAnonymous
February 13, 2013
The comment has been removedAnonymous
April 05, 2013
The comment has been removedAnonymous
April 25, 2013
Hello Levent, what auth mode was configured for EWS Website in IIS? Try basic with SSL or digest Apache Commons HttpClient 3.1 (commons-httpclient-3.1.jar)does not implement NTLMv2, it only implements the older NTLM (aka NTLMv1)Anonymous
October 11, 2013
I can't create an appointment with the API, because I can't create a TimeZoneDefinition properly, no matter what I do. By the way, the documentation doesn't even address needing to add a "startTimeZone" to an appointment.Anonymous
November 18, 2013
The comment has been removedAnonymous
January 06, 2014
Hi Michael Is it possible to use this version against Exchange 2013 (if one doesn't need any new 2013 specific functionality?) Regards MickaelAnonymous
March 24, 2014
Hi Michael, Do we have support for Exchange 2013? Regards, Subhrodeep MukherjeeAnonymous
April 02, 2014
Hi Michael How do I use getConflictingMeetingCount? I'll getting Exception: This operation can't be performed because this service object doesn't have an Id.Anonymous
May 16, 2014
Just an update that the EWS Java API is no longer available on archive.msdn.microsoft.com/ewsjavaapi. It's being moved to code.msdn.microsoft.com/Exchange-EWS-Java-API-12-1a5a1143 and will be available soon.Anonymous
May 20, 2014
Hi All, there's an error into EwsXmlReader. It's Ok when running into standalone app, but not when it's run into weblogic server. A workaround is :
- Method isStartElement : public boolean isStartElement(XmlNamespace xmlNamespace, String localName) { return (this.isStartElement()) && (this.getLocalName().equals(localName)) && ((this.getNamespacePrefix().equalsIgnoreCase(EwsUtilities.getNamespacePrefix(xmlNamespace))) || (this.getNamespaceUri().equalsIgnoreCase(EwsUtilities.getNamespaceUri(xmlNamespace)))); }
- Method internalReadElement: private void internalReadElement(XmlNamespace xmlNamespace, String localName, XMLNodeType nodeType) throws Exception { if (xmlNamespace == XmlNamespace.NotSpecified) { this.internalReadElement("", localName, nodeType); } else { this.read(nodeType); if ((!this.getLocalName().equals(localName)) || (!this.getNamespaceUri().equalsIgnoreCase(EwsUtilities.getNamespaceUri(xmlNamespace)))) { throw new ServiceXmlDeserializationException( String .format( Strings.UnexpectedElement, EwsUtilities .getNamespacePrefix( xmlNamespace), localName, nodeType.toString(), this .getName(), this.getNodeType() .toString())); } } }
Anonymous
May 27, 2014
I noticed that EWS Java 1.2 has been marked with an Apache 2.0 license. Let me just say this... FINALLY! If ever there was a project that needed it, it's EWS Java. That API has seemingly turned into abandonware and the old license forbade redistribution of modified source, so the many bugs in it had to be independently fixed by devs around the world. Not fun. With a proper open source license, this problem can be alleviated. HOWEVER... After downloading the zip file from the new EWS Java page, I've found that while the Apache 2.0 license is present in the root directory, the earlier and more restrictive license is still present in the project directory. This introduces ambiguity into the license terms. Not good. I would not be comfortable redistributing modified (or even original) source code with this kind of ambiguity, even if it's just an oversight on Microsoft's part. Please remove the old license entirely from the API. Also, if possible, can this get an official repository? The new license is great, but with only a zip file as an "official" source, it's begging for fragmentation across who-knows-how-many repositories and accounts, especially since it's not even a proper Maven project. I'd love to do some work on EWS Java myself (I've already fixed a number of bugs), but with the license issues and lack of an official repository, that doesn't seem terribly feasible.Anonymous
May 30, 2014
I responded to "Someone's Dev Account" via email, but I'll post here as well. In response to your licensing questions, we removed the Apache license from the download package. The original license still applies. With that said, in what way do you find the original license restrictive, as it does allow you to modify and redistribute the source code with applications you develop? If you could share your concerns, maybe we can clarify or address them – or at least pass them along. As for an official repository, your point is well taken and I’ve passed it on to the code owners.Anonymous
June 04, 2014
The comment has been removedAnonymous
June 04, 2014
i m also facing the same issue as posted by Shekhar. any solution to this. i also see below in the Console .. Jun 05, 2014 7:46:29 PM org.apache.commons.httpclient.HttpMethodBase readResponseBody INFO: Response content length is not known Jun 05, 2014 7:46:29 PM org.apache.commons.httpclient.auth.AuthChallengeProcessor selectAuthScheme INFO: Basic authentication scheme selected Jun 05, 2014 7:46:34 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry INFO: I/O exception (java.net.ConnectException) caught when processing request: Connection refused: connect Jun 05, 2014 7:46:34 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry INFO: Retrying request Jun 05, 2014 7:46:35 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry INFO: I/O exception (java.net.ConnectException) caught when processing request: Connection refused: connect Jun 05, 2014 7:46:35 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry INFO: Retrying request Jun 05, 2014 7:46:37 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry INFO: I/O exception (java.net.ConnectException) caught when processing request: Connection refused: connect Jun 05, 2014 7:46:37 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry INFO: Retrying request Jun 05, 2014 7:46:40 PM org.apache.commons.httpclient.HttpMethodBase readResponseBody INFO: Response content length is not known Jun 05, 2014 7:46:41 PM org.apache.commons.httpclient.auth.AuthChallengeProcessor selectAuthScheme INFO: Basic authentication scheme selected Jun 05, 2014 7:46:43 PM org.apache.commons.httpclient.auth.AuthChallengeProcessor selectAuthScheme INFO: Basic authentication scheme selected Jun 05, 2014 7:46:45 PM org.apache.commons.httpclient.auth.AuthChallengeProcessor selectAuthScheme INFO: Basic authentication scheme selected Jun 05, 2014 7:46:45 PM org.apache.commons.httpclient.auth.AuthChallengeProcessor selectAuthScheme INFO: Basic authentication scheme selectedAnonymous
June 22, 2014
Hi, the EWS Managed API is currently at version 2.0. Can anyone tell me if the difference to "our" 1.2 is large or if there are any plans for upgrading the Java API to 2.0, too? Thanks and regards, StefanAnonymous
July 19, 2014
Hi, I have one doubt, with 1.2 is there any way we can send EmailMessages as a list. My ultimate goal is to collect all the EmailMessage as a list and send to avoid multiple calls.Anonymous
July 24, 2014
Mimi: you wrote: "I responded to "Someone's Dev Account" via email, but I'll post here as well. In response to your licensing questions, we removed the Apache license from the download package. The original license still applies. With that said, in what way do you find the original license restrictive, as it does allow you to modify and redistribute the source code with applications you develop? If you could share your concerns, maybe we can clarify or address them – or at least pass them along. As for an official repository, your point is well taken and I’ve passed it on to the code owners." ============ The concerns are simple.
- MS's updates have been rare, and there are strong signs of this being abandonware. As it is many 2013 new things are not exposed.
- Hence sending bug fixes, patches, and improvements to MS doesn't seem to help, since no one else will ever know about them.
- There are many members of the community who would like to fix the code, enhance it, etc. We don't need to brand it as MS approved, but we need the legal right to post on github modified code and collaborate. Please please please consider a license modification!
Anonymous
August 29, 2014
August 28th, 2014 update: The EWS Java API is now available on GitHub as an open source project, ews-java-api. For more details, see the new blog post (blogs.office.com/.../open-sourcing-exchange-web-services-ews-java-api) on http://blogs.office.com/dev. Github project: github.com/.../ews-java-api Blog post: blogs.office.com/.../open-sourcing-exchange-web-services-ews-java-apiAnonymous
September 04, 2014
Thank you mime et al!Anonymous
August 25, 2016
The comment has been removedAnonymous
September 10, 2016
Hi,Is there any plan for supporting Exchange Server 2013 version? I got to know that ews-java-api 2.0 version jar support only till Exchange 2010 SP2 version but my requirement is I want to communicate Exchange Server 2013 version through ews-java-api 2.0 can you please tell me is it possible to communicate Exchange server 2013 version through ews-java-api and can I access calendar items exchange web services through ews-java-api?Anonymous
April 07, 2017
The comment has been removed