none
[EWSJavaAPI-1.1.5] How to handle invalid authentication in EWSJavaAPI RRS feed

  • Question

  • i am using **EWSJavaAPI 1.1.5** 
    and i am trying to login with invalid credentials, but i don't get any exceptions ?
    please advise how to detect and handle invalid login.

    here's my code:

        String host = "myhost";    		ExchangeService service = null;    		try {    			service = new ExchangeService();    			ExchangeCredentials credentials = new WebCredentials("wrongemail",    					"wrongpass");    			service.setCredentials(credentials);    			service.setUrl(new java.net.URI("https://" + host    					+ "/EWS/Exchange.asmx"));    		} catch (Exception e) {    			e.printStackTrace();    		}

    Monday, November 12, 2012 1:04 PM