Views:

Question:
How to configzre TCP Trace for Web Services

Answer:
By following these guidelines it will be possible to monitor the xml-based communication between the DocuWare Web Service Server and the Web Service client application with tools like "tcptrace". To be able to trace the messages some changes have to be made in the file "DWWebService.exe.config", which can be found in the installation directory of the Web Services Server (by default C:\Program Files\DocuWare\WebServices).


First add an "endpoint address" like in the example below. This setting overrides the default endpoint address port 9007 with the port that the trace tool is later listening on. In our example: 8383.

The next step would be to add the attribute "listenUri" with the name of the server and the appropriate port number. The Web Services Server will later on listen on this address for connections. In our example: 8080. The Web Services are available on ports 8080 and 9007, now.

Both values have to be added in every <service> tag that contains the appropriate port number as the baseAddress - 9007 or 9008. In our example we changed all sections that have the port 9007 as a baseAddress.


The DocuWare Web Services service have to be restarted now.

Example:


<services> <service name="DocuWare.WebServices.CompatibleServices.Services.DWService" behaviorConfiguration="ServiceBehavior">
        <host>
          <baseAddresses>
            <add baseAddress="http://localhost:9007/DWService"/>
          </baseAddresses>
        </host>
        <!-- use base address provided by host -->
       <
endpoint address="http://localhost:8383/DWService"
        listenUri="http://localhost:8080/DWService
"   
        binding="basicHttpBinding"
        bindingConfiguration="Binding1"
        contract="DocuWare.WebServices.CompatibleServices.Interfaces.IDWService" />

 </service>


If the communcation between Web Services Server and your own web application should be traced, you have to amend the *.config file of the application (by default "App.config").

Enter the port on which the trace tool is listening, in our example: 8383.

Do this for all <endpoint address> entries in the <client> section.

Example:

<client>
   <endpoint address="http://localhost:
8383/ResultListService" 
     binding="basicHttpBinding" 
     bindingConfiguration="BasicHttpBinding_IResultListService" 
     contract="IResultListService" 
     name="BasicHttpBinding_IResultListService"/>
</client>


According to the above settings the trace tool (e.g. "tcptrace") has to be configured to listen on the new endpoint address and forward the network traffic to the used "listenUri".

Example for the tool tcpTrace:

Finally start your own application.

Download tcpTrace:
tcpTrace.zip