Debugging Web Service calls and Soap Messages

The Muhimbi Conversion Service is a Windows Service based on the Microsoft Windows Communication Foundation (WCF) framework. This comprehensive framework is used to expose a standards based Web Services interface that can be consumed by many different platforms including .NET, Java, PHP, SAP, Documentum and many others.

Even though WCF Web Services are standards based, standards are not interpreted the same by everyone so from time to time you may need to do some troubleshooting when programming against  the PDF Converter Web Service, especially from non-Microsoft platforms.

Fortunately WCF comes with extensive tracing and logging facilities that can be used to log exactly what is going on during a Web Service call, including the logging of SOAP messages, which is particularly useful.

You can enable WCF logging as follows. Please revert  these settings when you are done as the log files will grow very quickly.

  1. Open the Conversion Service's config file in notepad. It is located in the folder the software has been deployed to, there is a handy shortcut to this folder in the Windows Start menu. The config file is named 'Muhimbi.DocumentConverter.Service.exe.config'.

  2. Just before the '</configuration>' element add the following. Update the location of the log file (in red) if needed:

  3. In the '<system.serviceModel>' element add the following:

  4. Save the config file and restart the Muhimbi Document Converter Service.

  5. Make a single Web Service call to log all information to the Trace Log. You may want to log the same operation using the Diagnostics Tool that ships with our PDF Converter, also available in the Windows Start menu. You can then verify the SOAP message logged by your software with the message logged by our software.

  6. Open the log file (C:\trace.svclog) in SvcTraceViewer.exe. If already installed on your system then double clicking the log file should open it. If the viewer is not installed then download the Windows SDK (You only need to install .NET Development / Tools).

  7. In the Trace Viewer navigate to the first ' Process action...' activity and select the Message Log Trace option followed by the Message tab. Alternatively click on the top level Message tab to display all messages. (Switch to the 'Message View' by subsequently clicking the Message tab in the bottom-right pane).

If the difference between your request and the request made by the Muhimbi Diagnostics tool is not immediately clear then you can use a free 'Diff' tool to compare two Soap Messages (not the entire trace file) and highlight the differences. Depending on your Web Services framework you may want to rename the namespaces in one of the messages so it matches the other's as this reduces the number of differences highlighted.(e.g. replace all "<ns1:" & "</ns1:" references with "<a:" & "</a:").

For more details about WCF logging see the MSDN Website.

Have a Question?
We’re Always Happy to Help.

© Muhimbi Ltd. 2008 - 2024
This website uses cookies to ensure you get the best experience. Learn more