LiranC
LiranC

Reputation: 2480

Working with ews - java - api

I need to work with exchange web services via ews-java-api. I downloades it from github, built it with maven and imported it to my eclipse using this link and guide: https://github.com/OfficeDev/ews-java-api/wiki/Building-EWS-JAVA-API (downloaded it without the "Gnupg")

3 jars were created after the build. i created a new java project in eclipse and included the extrenal jars and there were no errors, and "hello world" is working on this project. in the screenshot you can see the included jars and the hello world working fine.

hello world working

but when i try to set up a new line as states in the documentary (link to "getting started", it doesnt recoginze anything from the libarary.

for example im trying to set up the url: complition error

Upvotes: 0

Views: 932

Answers (1)

Guillaume
Guillaume

Reputation: 494

Add this before :

ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2010_SP2);
ExchangeCredentials credentials = new WebCredentials("emailAddress", "password");
service.setCredentials(credentials);

From : https://github.com/OfficeDev/ews-java-api/wiki/Getting-Started-Guide#responding-to-autodiscover-redirecting

Upvotes: 1

Related Questions