3

I'm using a 32bit BizTalk 2013r1 host instance to send an insert request to Oracle via the LOB adapter.

I need to trace the message body being sent. I have configured the btsntsvc.exe.config as follows:

<configuration>
<system.diagnostics>
    <sources>
        <source name="System.ServiceModel" switchValue="Verbose,ActivityTracing">
            <listeners>
                <add type="System.Diagnostics.DefaultTraceListener" name="Default">
                    <filter type="" />
                </add>
                <add name="xml">
                    <filter type="" />
                </add>
            </listeners>
        </source>
        <source name="System.ServiceModel.MessageLogging" switchValue="Verbose, ActivityTracing">
            <listeners>
                <add type="System.Diagnostics.DefaultTraceListener" name="Default">
                    <filter type="" />
                </add>
                <add name="xml">
                    <filter type="" />
                </add>
            </listeners>
        </source>
        <source name="System.Runtime.Serialization" switchValue="Verbose">
            <listeners>
                <add type="System.Diagnostics.DefaultTraceListener" name="Default">
                    <filter type="" />
                </add>
                <add name="xml">
                    <filter type="" />
                </add>
            </listeners>
        </source>
    </sources>
    <sharedListeners>
        <add initializeData="C:\logs\WCFTrace2.svclog" type="System.Diagnostics.XmlWriterTraceListener"
name="xml" traceOutputOptions="LogicalOperationStack">
            <filter type="" />
        </add>
    </sharedListeners>
    <trace autoflush="true" />
</system.diagnostics>

<system.serviceModel>
    <client>
        <remove contract="IMetadataExchange" name="oracledb" />
        <endpoint binding="oracleDBBinding" contract="IMetadataExchange"
name="oracledb" />
    </client>
    <diagnostics>
        <messageLogging logEntireMessage="true" logMalformedMessages="true"
logMessagesAtServiceLevel="true" logMessagesAtTransportLevel="true" />
        <endToEndTracing activityTracing="true" messageFlowTracing="true" />
    </diagnostics>
</system.serviceModel>

My problem is that although the header of the message is logged the body is simply recorded as "...stream..."

<MessageLogTraceRecord>
<s:Envelope xmlns:a="http://www.w3.org/2005/08/addressing"      xmlns:s="http://www.w3.org/2003/05/soap-envelope">
<s:Header>
<a:Action     s:mustUnderstand="1">http://Microsoft.LobServices.OracleDB/2007/03/BTS/Table/FOOTFALL/Insert</a:Action>
<a:MessageID>urn:uuid:5925f3c6-7670-4eaf-843f-df18a609a4fd</a:MessageID>
<a:ReplyTo>
<a:Address>http://www.w3.org/2005/08/addressing/anonymous</a:Address>
</a:ReplyTo>
</s:Header>
<s:Body>... stream ...</s:Body>
</s:Envelope>
</MessageLogTraceRecord>

Could any please let me know what I need to do to obtain a log of the message body?

Rob Bowman
  • 7,632
  • 22
  • 93
  • 200
  • Why are you trying to use `WCF` message logging instead of the `BizTalk` tracking mechanism? Did you try enabling tracking on the WCF port? – oɔɯǝɹ Dec 28 '14 at 23:58
  • When the BizTalk adapter fails to send a message there is no content available in the tracking db. – Rob Bowman Dec 30 '14 at 11:29
  • Hmm, then there seems to be another problem, not directly message related. Are there messages in the Windows Event Log? – oɔɯǝɹ Dec 30 '14 at 11:56
  • The problem; I was sending a request that was rejected by Oracle. I have since overcome this. But I think the question is still valid, when the Oracle adapter fails you get no message in the tracking db. The only alternative to help with fault finding would be to use WCF tracing but while the shows the message envelope and header, which is helpful, it does not show the message body. – Rob Bowman Jan 01 '15 at 09:03
  • How did you find out what was going wrong? – oɔɯǝɹ Jan 01 '15 at 14:54

1 Answers1

0

Creating another send port that uses the FILE adapter is quite easy.

  • Set the filter to catch the same messages that would go to Oracle
  • Add the same maps

This will then write a file to some location for each request, and contain the same message body content as would be sent to the Oracle adapter.

Gruff
  • 555
  • 1
  • 9
  • 14
  • Yes I did this but I wanted to use WCF tracing because I need to check the response - and this doesn't seem to be reaching the msgbox. I guess tracing of the message body maybe not working because the adapter is streaming but open to suggestions – Rob Bowman Oct 30 '14 at 10:20
  • What makes you think the response does not seem to be reaching the msgbox? The absence of a routing failure? To grab the response coming back from the send port you could try this: https://social.msdn.microsoft.com/Forums/en-US/a459dfe2-91c8-4ece-bd8e-2b838d8c343d/how-to-capture-a-response-received-using-two-way-static-solicit-response-send-port-without-having?forum=biztalkgeneral – Gruff Oct 30 '14 at 18:10
  • I've enabled all tracking on the port but when I view "Tracked message events I see nothing" – Rob Bowman Nov 05 '14 at 16:57