Skip to main content

EWS ContactSync Plugin

About the plugin

The Exchange contact sync plugin is a server-side plugin that enables bidirectional synchronization of contacts between ADITO and an Exchange server.

Detailed information about plugins can be found in AID004-EN_Plugins for ADITO.

Overview of functions

The plugin can synchronize contacts from ADITO with Exchange from version Exchange 2007. The basic configuration is similar to the Exchange calendar backend. This document describes the installation and configuration of the plugin.

Preparatory work

First, the connection to Exchange must be prepared. To do this, proceed in the same way as for setting up the calendar connection. If you already have a working Exchange calendar connection, you can continue with the next step, otherwise please fill in the document AID081a, in order to make sure you always have all the necessary data at hand during the setup.

If the connection is done, respectively you have all necessary data, it must be clarified whether your address management corresponds to the current ADITO standard. If this is not the case, you may need to make adjustments to the function libraries to ensure that the correct data is transferred for synchronization.

In addition, the current versions of the plugin and the necessary adjustments must be obtained from ADITO.

To include EWS Contact Sync you need the following contexts, processes and libraries:

Contexts:

  • SearchSync
  • SyncContact
  • SyncedSearches
  • EwsSyncAddContacts

Processes:

  • EwsSyncContact_serverProcess
  • EwsSyncToExchange_serverProcess

Libraries:

  • EWS_lib
  • EWSClient_lib
  • CalendarPermEWS_lib

If you’re using modularization, you can include the module "ews-sync" in your project.

In addition, a database change must be made. The table COMM has to be extended by the column SYNCED ( char(1) ):

    alter table COMM add SYNCED char(1);

Installation

To install the plugin, you need to copy the EWSClient.jar file to the plugin directory of the server, which can be found in the installation directory under the path /lib/server/plugins. After copying the plugin to the appropriate path, the server must be restarted. The ADITO server loads all plugins to start. More information about plugins can be found in AID004 Plugins.

Necessary changes for the installation when using Exchange 2010 before SP1

In order to be able to use the Exchange contact plugin, changes still have to be made to the Exchange installation. Here the following files have to be changed.

  • Services.wsdl
  • Types.xsd
  • web.config (Für die Verwendung bei https)

The Services WSDL are normally located in the EWS folder of the Microsoft Exchange installation (e.g. C:/Program Files/Microsoft/Exchange Server/ClientAccess/exchweb/ews or in the ews subfolder of the Internet Information Services Manager). For this feature to be available, the Client-Access-Role must be installed.

Changes in Services.wsdl

Here, the service definition must be entered. This is done in the penultimate line between </wsl:binding> and </wsl:definitions>.

Instead of <host> the corresponding server name must be entered.

Changes in Types.xsd

The following changes must be made in Types.xsd:

  1. Delete or comment out the line

    `<xs:attribute ref="xml:lang" use="optional" />`
  2. Extend the RestrictionType: 2.1 The old entry…​

    <xs:complexType name="RestrictionType">
    <xs:sequence>
    <xs:element ref="t:SearchExpression"/>
    </xs:sequence>
    </xs:complexType>

    …​must be replaced by:

    <xs:complexType name="RestrictionType">
    <xs:sequence minOccurs="1" maxOccurs="1">
    <xs:element ref="t:IsEqualTo"/>
    <xs:element ref="t:Exists"/>
    <xs:element ref="t:Excludes"/>
    <xs:element ref="t:IsNotEqualTo"/>
    <xs:element ref="t:IsGreaterThan"/>
    <xs:element ref="t:IsGreaterThanOrEqualTo"/>
    <xs:element ref="t:IsLessThan"/>
    <xs:element ref="t:IsLessThanOrEqualTo"/>
    <xs:element ref="t:Contains"/>
    <xs:element ref="t:Not"/>
    <xs:element ref="t:And"/>
    <xs:element ref="t:Or"/>
    <xs:element ref="t:SearchExpression"/>
    </xs:sequence>
    </xs:complexType>

    2.2 Modify the TwoOperandExpressionType. The old entry…​

    <xs:complexType name="TwoOperandExpressionType" abstract="true">
    <xs:complexContent>
    <xs:extension base="t:SearchExpressionType">
    <xs:sequence>
    <xs:element ref="t:Path"/>
    <xs:element name="FieldURIOrConstant" type="t:FieldURIOrConstantType"/>
    </xs:sequence>
    </xs:extension>
    </xs:complexContent>
    </xs:complexType>

    …​must be replaced by:

    <xs:complexType name="TwoOperandExpressionType" abstract="true">
    <xs:complexContent>
    <xs:extension base="t:SearchExpressionType">
    <xs:sequence>
    <xs:element ref="t:FieldURI"/>
    <xs:element name="FieldURIOrConstant" type="t:FieldURIOrConstantType"/>
    </xs:sequence>
    </xs:extension>
    </xs:complexContent>
    </xs:complexType>

    2.3 Modify the ContainsExpressionType. The old entry…​

    <xs:complexType name="ContainsExpressionType">
    <xs:complexContent>
    <xs:extension base="t:SearchExpressionType">
    <xs:sequence>
    <xs:element ref="t:Path"/>
    <xs:element name="Constant" type="t:ConstantValueType" />
    </xs:sequence>
    <xs:attribute name="ContainmentMode" type="t:ContainmentModeType" use="optional" />
    <xs:attribute name="ContainmentComparison" type="t:ContainmentComparisonType" use="optional"/>
    </xs:extension>
    </xs:complexContent>
    </xs:complexType>
    <xs:element name="Contains" type="t:ContainsExpressionType" substitutionGroup="t:SearchExpression"/>

    …​must be replaced by:

    <xs:complexType name="ContainsExpressionType">
    <xs:complexContent>
    <xs:extension base="t:SearchExpressionType">
    <xs:sequence>
    <xs:element ref="t:FieldURI"/>
    <xs:element name="Constant" type="t:ConstantValueType" />
    </xs:sequence>
    <xs:attribute name="ContainmentMode" type="t:ContainmentModeType" use="optional" />
    <xs:attribute name="ContainmentComparison" type="t:ContainmentComparisonType" use="optional"/>
    </xs:extension>
    </xs:complexContent>
    </xs:complexType>
    <xs:element name="Contains" type="t:ContainsExpressionType" substitutionGroup="t:SearchExpression"/>

Changes to web.config

This file is normally located in C:\Program Files\Microsoft\Exchange Server\V14\ClientAccess\exchweb\ews. Some changes must be made here to allow access to the Exchange server via https.

  1. The following line…​

    <endpoint address="" binding="customBinding" bindingConfiguration="EWSHttpsBinding" contract="Microsoft.Exchange.Services.Wcf.IEWSContract" />

    …​must be replaced by:

    <!-- Standard EWS HTTP endpoint-->
    <endpoint address="" binding="customBinding" bindingConfiguration="EWSHttpBinding" contract="MicrosoftExchange.Services.Wcf.IEWSContract" />
    <!-- Standard EWS HTTPS endpoint -->
    <endpoint address="" binding="customBinding" bindingConfiguration="EWSHttpsBinding" contract="Microsoft.Exchange.Services.Wcf.IEWSContract" />
  2. The following line…​

    <binding name="EWSHttpsBinding">
    <EWSMessageEncoderSoap11Element />
    <httpsTransport maxReceivedMessageSize="13600000" authenticationScheme="Anonymous"
    maxBufferSize="81920" transferMode="Streamed" />
    </binding>

    …​must be replaced by:

     <!-- EWS endpoint binding for HTTP -->
    <binding name="EWSHttpBinding">
    <EWSMessageEncoderSoap11Element />
    <httpTransport maxReceivedMessageSize="13600000" authenticationScheme="Anonymous"
    maxBufferSize="81920" transferMode="Streamed">
    </httpTransport>
    </binding>
    <!-- EWS endpoint binding for HTTPS-->
    <binding name="EWSHttpsBinding">
    <EWSMessageEncoderSoap11Element />
    <httpsTransport maxReceivedMessageSize="13600000" authenticationScheme="Anonymous"
    maxBufferSize="81920" transferMode="Streamed" >
    </httpsTransport>
    </binding>

Please note that the preceding code has been provided with line breaks for the sake of clarity. These must be removed again when pasting into another file.

For more info, please visit: http://blogs.msdn.com/b/dvespa/archive/2009/12/22/how-to-configure-a-http-endpoint-for-exchange-web-services-in-exchange-2010.aspx