Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant