Skip to content
This repository has been archived by the owner on Jun 18, 2024. It is now read-only.

Other environments Lucee #752

Open
ASKemp opened this issue Mar 1, 2022 · 0 comments
Open

Other environments Lucee #752

ASKemp opened this issue Mar 1, 2022 · 0 comments

Comments

@ASKemp
Copy link

ASKemp commented Mar 1, 2022

I'm trying to make use of this api from within a Lucee application but making slow progress.

I have...
<cfset userName = "abcde">
<cfset password = "12345">
<cfset domain = "xyz">
<cfset serverAddress = "https://ourserver/EWS/Exchange.asmx">
<cfset javaPath = "D:\pathToJarFiles">

<cfset exchangeVersion = createObject("java","microsoft.exchange.webservices.data.core.enumeration.misc.ExchangeVersion",javaPath).Exchange2010_SP2>
<cfset exchangeService = createObject("java","microsoft.exchange.webservices.data.core.ExchangeService",javaPath).init(exchangeVersion)>
<cfset webCredentials = createObject("java","microsoft.exchange.webservices.data.credential.WebCredentials",javaPath).init(userName,password,domain)>

<cfset exchangeService.setCredentials(webCredentials)>

<cfset uri = createObject("java","java.net.URI",javaPath)>
<cfset serverUri = uri.create(serverAddress)>
<cfset exchangeService.setUrl(serverUri)>

<cfset wellKnownFolderName = createObject("java","microsoft.exchange.webservices.data.core.enumeration.property.WellKnownFolderName",javaPath)>
<cfset folderClass = createObject("java","microsoft.exchange.webservices.data.core.service.folder.Folder",javaPath).init(exchangeService)>
<cfset inbox = folderClass.bind(exchangeService,wellKnownFolderName.Inbox)>

But at the final point, of setting a variable to the inbox, I'm getting an error of 'javax/xml/ws/http/HTTPException' - any ideas?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant