Steps to facilitate the creation of WCF Interceptor Configuration file.
The BAM Interceptor for WCF does not come with a UI tool to create the Interceptor Configuration file, and from the Beta II customer feedback thus far, this is the main pain point as well. I will try to provide some steps and guidelines to help ease this concern.
A common scenario is when the WCF application configuration file is updated and the IC is created and deployed, there is not data intercepted and persisted into the BAM PITDB (Primary Import Tables Database). When the event log is checked out without error and that the bm.exe deploy-interceptor is successful, most likely the culprit is in the IC – somewhere in the IC, the XPath is incorrectly set.
Here is what I would do:
Enable WCF logging/tracing to produce the wcf log. In the config file of the “interceptee” application (either or both client and service), splice the following highlighted code.
<source name="System.ServiceModel" switchValue="Verbose, ActivityTracing" >
<add name="xml" />
<source name="System.ServiceModel.MessageLogging" switchValue="Verbose">
<add name="xml" />
<source name="Microsoft BizTalk Bam Interceptors" switchValue="All" >
<add name="myListener" type="System.Diagnostics.TextWriterTraceListener"
<trace autoflush="true" />
Rerun the application. This should generate a WCF trace file: *.e2e.
Use the SvcTraceViewer.exe tool (comes with WCF SDK installation) to view the wcf log and copy out the message into a .xml file.
Here in this snapshot of the tool, you should copy out the s:envelop node.
Use and xpath tool (such as VisualXPath) to drill down to the specific area of the message to produce a valid XPath. Copy and past this into the interceptor configuration file.
Redeploy the IC and rerun the application.
Hopefully the above steps would help surface the problematic XPaths in the IC and speed up your work.