Independentsoft
- any library, any programming language
Home
Purchase
Support
Company
Contact
JWebServices for Exchange
>
Tutorial
> Authentication for Exchange server (on-premisses)
The following example shows you how to use Basic authentication.
import com.independentsoft.exchange.Service; import com.independentsoft.exchange.OAuthToken; import com.independentsoft.exchange.ServiceException; import com.independentsoft.exchange.Folder; import com.independentsoft.exchange.StandardFolder; public class Example { public static void main(String[] args) { try { Service service = new Service("https://myserver/ews/Exchange.asmx", "username", "password"); //test authentication Folder inbox = service.getFolder(StandardFolder.INBOX); System.out.println("Inbox = " + inbox.getDisplayName()); } catch (ServiceException e) { System.out.println(e.getMessage()); System.out.println(e.getXmlMessage()); e.printStackTrace(); } } }
Need help? Ask our developers:
Name*
Email*
Message*