I have an Exchange Server 2007 SP1 and want to create an appointment with the EWS Java API 1.1. I got an Exception that I have to set the time zone definition first.
appointment.setStartTimeZone(new TimeZoneDefinition(){{
setName( "W. Europe Standard Time" );
}});
I tried to set it directly but got this exception:
The time zone definition is invalid or unsupported
I saw some workarounds where you have to edit the Java API (like skipping the TimeZoneDefinition validation) but if its possible I dont want to do any changes there. I hope someone knows how I can set the TimeZoneDefinition properly (without modifying the base Java API).
Edit: In .NET it seems you can set the TimeZoneDefinition directly like:
appointment.StartTimeZone = TimeZoneInfo.Local;
But I cant find anything like this in the Java API
I faced the same problem - and tried mostly everything (besides from editig the java ews api itself) to make Appointments with StartTimeZone work with Exchange 2007 SP1 in my Spring Web Application - without success.
I found comments like: Unfortunately, Exchange 2007 SP1 does not support the StartTimeZone property of EWS. If you want to use that property, you must use Exchange 2010. That i should go, look for less "flacky" Java Exchange Framework.
I wasnt pleased and as i heard there is no such problem in the .NET universe i decided to go with the following solution:
I set up a self-hosted Nancy Server.
see the Nancy Documentation
And wrote a simple NancyModule:
Now i can call this WS from my Spring Controller by passing my Appointment Data as a json Object via RestTemplate:
Ofc u need to decide if you want to use some kind of password encryption when passing credentials from one server to another - and how you implement your error handling.
but it works like a charm for me
and i am feeling very confident about future requests regarding other EWS funcionalities.