问题
there is a microsoft API for Java to connect to Micrsoft Exchange Webservices. Unfortunately it doesn't work on Android as mentioned in the Microsoft tutorial.
Has anybody an idea how to connect to Microsoft Exchange with Android? There is a solution using WebDav, but WebDav is only supported by Microsoft up to Exchange 2007.
Can anybody help me?
thx
Eddy
回答1:
You can use microsoft's EWS api which is open source for android by doing the following steps,
Download the source code available in the URL, http://archive.msdn.microsoft.com/ewsjavaapi EWSJavaAPI_1.1.5.zip
Make the changes to above api to work for JDK 1.4 in eclipse like remove override annotations etc
Download source code of
javax.*
package available in below URL, http://www.java2s.com/Code/Jar/j/Downloadjsr17310srcjar.htm jsr173_1.0_src.jar.zipDownload source code of stax api available in below URL, http://dist.codehaus.org/stax/distributions stax-src-1.2.0.zip
Keep all the sources under the single java project in eclipse
Open the project explorer and select the package which are starts with "javax" and rename to your company name eg: com. Note: Eclipse will ask for all the naming contexts will change then click OK.
Export all the java sources to one single jar file.
You are good now to go to use the jar in Android application with out any problems.
I used the same way explained above and it worked in android application 100% perfectly.
回答2:
There is a JAVA version of the EWS Managed API. Perhaps you can use that as a starting point.
http://archive.msdn.microsoft.com/ewsjavaapi.
来源:https://stackoverflow.com/questions/7476055/use-exchange-web-services-on-android