Quantcast
Channel: Adobe Community : Unanswered Discussions - ColdFusion
Viewing all articles
Browse latest Browse all 5794

Does anyone know of step-by-step instructions for using CF9, Exchange 2007, and EWS API

$
0
0

I've been working on this for quite a while now.  I find it embarassingly undocumented by both Microsoft and Adobe.  I downloaded the EWS API v1.2 jar file and placed it in the Coldfusion lib folder along with the jcifs.jar file.  I can connect and send an email, but I'm having a devil of a time creating an appointment.  Now I'm stuck on an error about the timezone.  I thought I might download the latest API version 2.0 but it ended up installing in the program files folder and has no jar files.  What am I missing?

 

FYI;  this is my current code

 

<cfscript>

          exchangeService = createObject("java", "microsoft.exchange.webservices.data.ExchangeService");

          //serviceEST = ExchangeService(TimeZoneInfo.FindSystemTimeZoneById("Eastern Standard Time"));

          exchangeVersion = createObject("java", "microsoft.exchange.webservices.data.ExchangeVersion");

          service = exchangeService.init(exchangeVersion.Exchange2007_SP1);

          webCredentials = createObject("java", "microsoft.exchange.webservices.data.WebCredentials");

          service.setCredentials(webCredentials.init("z@x.com","password"));

          serviceURI = createObject("java", "java.net.URI").init("https://owa016.msoutlookonline.net/EWS/Exchange.asmx?wsdl");

    service.setUrl(serviceURI);

          appointment = createObject("java", "microsoft.exchange.webservices.data.Appointment").init(service);

          appointment.StartTimeZone = TimeZoneInfo.FindSystemTimeZoneById("Eastern Standard Time");

          appointment.setStart("#StartDateTime#");

          appointment.setEnd("#EndDateTime#");

          appointment.setSubject("Dentist Appointment");

          MessageBody = createObject("java", "microsoft.exchange.webservices.data.MessageBody");

          appointment.setBody( MessageBody.init("The appointment is with Dr. Smith.") );

          SendInvitationsMode = createObject("java", "microsoft.exchange.webservices.data.SendInvitationsMode");

          appointment.Save(SendInvitationsMode.SendToNone);

</cfscript>


Viewing all articles
Browse latest Browse all 5794

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>