Configure WCF communication between Zen4Sync components


Overview

Zen4Sync components uses WCF to communicate.

232976
  • The Orchestrator calls a Test Server to start a new Test Session (1).
  • The Test Server starts as many Clients as needed to execute the Test Session (2.1). If a problem occurs while starting a Client, the Test Server informs the Orchestrator (2.1).
  • While executing a Client Session (a Test Session is made of multiple Client Session), the Client calls the Orchestrator to log the activities it performs.

You can modify the WCF configuration for each arrow representing a WCF communication.

Modify WCF settings

Orchestrator to Test Server

Modifying the Orchestrator to Test Server communication requires the modification of 2 App.config files.

First, modify the Test Server App.config file to specify the new WCF configuration.
This App.config file is the one used by the Zen4SyncTestServerHost Windows Service.
It's located in the directory where you installed the Zen4SyncTestServerHost Windows Service.

Locate the section describing the WCF hosting configuration :
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <system.serviceModel>
        <services>
            <!--
            Zen4Sync Test Server WCF hosting.
            Do not modify the service name.
            Do not modify the endpoint contract.
            If you want to modify the WCF configuration, please see 
            http://zen4sync.codeplex.com/wikipage?title=configureWCFCommunications
            -->            
            <service name="Zen4SyncTestServer.TestServerServices"> 
                <endpoint contract="Zen4SyncTestServerServices.ITestServerServices"
                          binding="netTcpBinding"
                          address="net.tcp://localhost/Zen4Sync/TestServerServices" />
            </service>
        </services>
    </system.serviceModel>
</configuration>

This is just a sample file, your file content may differ (except for the service name and the endpoint contract which should be the same).

Now you've modified the hosting configuration, you need to adjust the Orchestrator configuration so that it knows about the new WCF configuration.
To each Test Server corresponds a WCF configuration section name in the Orchestrator App.config file.
This configuration section name is defined in the Zen4SyncRepository database.
You can retrieve the configuration section name by executing the following SQL query on the Zen4SyncRepository database :

SELECT TS.testServer_wcfConfigSectionName
FROM [Admin].[testServer] TS
WHERE TS.testServer_hostName = 'the target test server hostname here';

Once you've retrieved the configuration section name, you can open the Orchestator App.config file.
This App.config file is the one used by the Zen4SyncOrchestratorHost Windows Service.
It's located in the directory where you installed the Zen4SyncOrchestratorHost Windows Service.

Locate the section corresponding to the configuration section name you've retrieved.

In this example case, the configuration section name would be TestServer1 :

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <system.serviceModel>
        <!--
        Zen4Sync Test Servers communication configuration.
        Do not modify the endpoint contracts.
        If you want to modify the configuration, please see
        http://zen4sync.codeplex.com/wikipage?title=configureWCFCommunications
        -->
        <client>
            <endpoint name="TestServer1"
                      contract="Zen4SyncTestServerServices.ITestServerServices"
                      binding="netTcpBinding"
                      address="net.tcp://localhost/Zen4Sync/TestServerServices" />
        </client>
    </system.serviceModel>
</configuration>

Modify the configuration according to the changes you've made on the Test Server side.

Test Server to Orchestrator

Modifying the Test Server to Orchestrator communication requires the modification of 2 App.config files.

First, modify the App.config file of the Orchestrator.
This App.config file is the one used by the Zen4SyncOrchestratorHost Windows Service.
It's located in the directory where you installed the Zen4SyncOrchestratorHost Windows Service.

In this file, locate the section corresponding to the Orchestrator WCF hosting :
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <system.serviceModel>
        <services>
            <!--
            Zen4Sync Orchestrator hosting configuration.
            Do not modify the service name.
            Do not modify the endpoint contract.
            If you want to modify the configuration, please see
            http://zen4sync.codeplex.com/wikipage?title=configureWCFCommunications
            -->
            <service name="Zen4SyncOrchestrator.OrchestratorServices">
                <endpoint contract="Zen4SyncOrchestratorServices.IOrchestratorServices"
                          binding="netTcpBinding"
                          address="net.tcp://localhost/Zen4Sync/OrchestratorServices" />
            </service>
        </services>
    </system.serviceModel>
</configuration>

Feel free to add endpoints and configure them according to your needs.

Once the server side is configured, you need to configure the client side.
This is done by modifying the Test Server App.config file.
This App.config file is the one used by the Zen4SyncTestServerHost Windows Service.
It's located in the directory where you installed the Zen4SyncTestServerHost Windows Service.

In this file, locate the section corresponding to the WCF client configuration :
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <system.serviceModel>
        <client>
            <!--
            Zen4Sync Orchestrator WCF communication configuration.
            Do not modify the endpoint name.
            Do not modify the contract name.
            If you want to modify the WCF configuration, please see
            http://zen4sync.codeplex.com/wikipage?title=configureWCFCommunications
            -->
            <endpoint name="Zen4SyncOrchestratorServices"
                      contract="Zen4SyncOrchestratorServices.IOrchestratorServices"
                      binding="netTcpBinding"
                      address="net.tcp://localhost/Zen4Sync/OrchestratorServices" />
        </client>
    </system.serviceModel>
</configuration>

Modify the configuration according to the Orchestrator WCF configuration.

Client to Orchestrator

Modifying the Client to Orchestrator communication requires the modification of 2 App.config files.

First, modify the App.config file of the Orchestrator.
This App.config file is the one used by the Zen4SyncOrchestratorHost Windows Service.
It's located in the directory where you installed the Zen4SyncOrchestratorHost Windows Service.

In this file, locate the section corresponding to the Orchestrator WCF hosting :
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <system.serviceModel>
        <services>
            <!--
            Zen4Sync Orchestrator hosting configuration.
            Do not modify the service name.
            Do not modify the endpoint contract.
            If you want to modify the configuration, please see
            http://zen4sync.codeplex.com/wikipage?title=configureWCFCommunications
            -->
            <service name="Zen4SyncOrchestrator.OrchestratorServices">
                <endpoint contract="Zen4SyncOrchestratorServices.IOrchestratorServices"
                          binding="netTcpBinding"
                          address="net.tcp://localhost/Zen4Sync/OrchestratorServices" />
            </service>
        </services>
    </system.serviceModel>
</configuration>

Feel free to add endpoints and configure them according to your needs.

Once the server side is configured, you need to configure the client side by modifying the App.config file used by Zen4SyncClient.exe.
This file is located in the same directory where you've deployed Zen4SyncClient.exe.

In the App.config file, locate the endpoint configuration :
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <system.serviceModel>
        <client>
            <!--
            Zen4Sync Orchestrator WCF communication configuration.
            Do not modify the endpoint name.
            Do not modify the contract name.
            If you want to modify the WCF configuration, please see
            http://zen4sync.codeplex.com/wikipage?title=configureWCFCommunications
            -->
            <endpoint name="Zen4SyncOrchestratorServices"
                      contract="Zen4SyncOrchestratorServices.IOrchestratorServices"
                      binding="netTcpBinding"
                      address="net.tcp://localhost/Zen4Sync/OrchestratorServices" />
        </client>
    </system.serviceModel>
</configuration>
Modify the endpoint configuration according to the server-side modifications you've made.

Last edited Apr 28, 2011 at 11:31 AM by Christophe_, version 23

Comments

No comments yet.