• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

CFExchange and Exchange 2010

New Here ,
Feb 04, 2011 Feb 04, 2011

Copy link to clipboard

Copied

Anyone have a solution to or a work around for the issue with cfexchange not talking to Exchange 2010?  We are migrating to 2010 within our company and I have several applications reading Exchange 2002 and 2007 calendars.

Ryan

Views

2.4K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 22, 2011 Aug 22, 2011

Copy link to clipboard

Copied

CFExchange in CF server  9  or older will not talk with Exchange 2010 at all, it is promissed to be fixed in CF 10.


As a solution you can use the EWS API. Read the stuff below. I hope my hint is helpfull to you.

--------------------------------------------------------------------------------------------

<!---
    With Exchange 2007 Microsoft abandoned WebDav as an interface to Exchangeserver.
    The standard Coldfusion Tags relied on WebDav and will not work anymore.
   
    Since I needed a way to interface with Exchange Server a started looking for possible solutions and this is what i came up with.
   
    In december 2010 Microsoft released the Exchange Managed Services Library for java.
    You can find it here: http://archive.msdn.microsoft.com/ewsjavaapi/Release/ProjectReleases.aspx?ReleaseId=5691
   
    In the getting started document it tells you it depends on 4 3rd party libraries which you need to be download separately:
        -    Apache Commons HttpClient 3.1 (commons-httpclient-3.1.jar)
        -    Apache Commons Codec 1.4 (commons-codec-1.4.jar)
        -    Apache Commons Logging 1.1.1 (commons-codec-1.4.jar)
        -    JCIFS 1.3.15 (jcifs-1.3.15.jar)
       
    With Coldfusion 9.1 (the version I tested with) you only need
        -    JCIFS 1.3.15 (jcifs-1.3.15.jar) which you can download here: http://jcifs.samba.org/src/
       
    Place the EWS Jar and the JCIFS Jar in your Coldfusion libray folder and after restarting CF server the following code should work.

    If you understand this you will be able to figure out your specific needs from the EWS API documentation.
--->
<!--- 1. I need an instance of the ExchangeService class --->
<cfobject type="Java" class="microsoft.exchange.webservices.data.ExchangeService" name="service">
<cfset service.init()>

<!--- 2.  I need to set the credentials --->
<!--- 2a. Create an instance of the WebCredentials class --->
<cfobject type="Java" class="microsoft.exchange.webservices.data.WebCredentials" name="credentials">
<!--- 2b. Set the credentials --->
<cfset credentials.init("test.account","test.password", "yourdomain.com")>
<!--- 2c. Set the credentials in the service object --->
<cfset service.setCredentials(credentials) />

<!--- 3.  In need to set the URL to Exchange (stay away from autodsicovery) --->
<!--- 3a. Create an instance of the Uri class --->
<cfobject type="Java" class="java.net.URI" name="uri">
<!--- 3b. Set the full path --->
<cfset uri.init("https://mail.yourdomain.com/ews/Exchange.asmx")>
<!--- 3c. Set the url in the service object --->
<cfset service.setUrl(uri) />

<!--- These are the steps you need to create valid a service object. --->

<!--- Now we need to do something with it. --->
<!--- I create a test message to my own mailbox to see if it works --->
<cfobject type="Java" action="create" class="microsoft.exchange.webservices.data.EmailMessage" name="message">
<cfset message = message.init(service) />
<cfset message.SetSubject("EWSTest")>

<cfset messageBody = CreateObject("java", "microsoft.exchange.webservices.data.MessageBody")>
<cfset messageBody.init("My EWS test message")>

<cfset message.SetBody( messageBody )>

<cfset message.ToRecipients.Add("myAccount@myDomain.com") >

<cfoutput>
    #message.SendAndSaveCopy()#
</cfoutput>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 31, 2013 Oct 31, 2013

Copy link to clipboard

Copied

Anyone ever get this to work?  The API documentation really bites!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 06, 2015 May 06, 2015

Copy link to clipboard

Copied

LATEST

It still works. I'm now rewriting the code using cfscript. Contact me if you still need it.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation