This repository has been archived by the owner on Jun 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 560
Custom Exchange services
Vladislav Bauer edited this page Apr 6, 2015
·
2 revisions
It is possible to customize some parts of Exchange services (ExchangeServiceBase
, AutodiscoverService
and ExchangeService
). You need to extend custom class to do it.
An example below shows how to switch off hostname verification:
public class CustomExchangeService extends ExchangeService {
@Override
protected Registry<ConnectionSocketFactory> createConnectionSocketFactoryRegistry() {
try {
return RegistryBuilder.<ConnectionSocketFactory>create()
.register(EWSConstants.HTTP_SCHEME, new PlainConnectionSocketFactory())
.register(EWSConstants.HTTPS_SCHEME, EwsSSLProtocolSocketFactory.build(
null, NoopHostnameVerifier.INSTANCE
))
.build();
} catch (GeneralSecurityException e) {
throw new RuntimeException(
"Could not initialize ConnectionSocketFactory instances for HttpClientConnectionManager", e
);
}
}
}
Copyright © 2015 Microsoft Corporation - Project is released under the terms of the MIT License
Website
Getting Started
FAQ
Misc
Project Team