【发布时间】:2014-12-19 15:54:30
【问题描述】:
我正在使用 32 位 BizTalk 2013r1 主机实例通过 LOB 适配器向 Oracle 发送插入请求。
我需要跟踪正在发送的消息正文。我已将 btsntsvc.exe.config 配置如下:
<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>
我的问题是,虽然记录了消息的标题,但正文只是简单地记录为“...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>
请告诉我我需要做什么才能获得消息正文的日志?
【问题讨论】:
-
您为什么尝试使用
WCF消息记录而不是BizTalk跟踪机制?您是否尝试在 WCF 端口上启用跟踪? -
当 BizTalk 适配器无法发送消息时,跟踪数据库中没有可用的内容。
-
嗯,那似乎还有一个问题,与消息无关。 Windows 事件日志中是否有消息?
-
问题;我正在发送一个被 Oracle 拒绝的请求。我已经克服了这一点。但我认为这个问题仍然有效,当 Oracle 适配器出现故障时,您在跟踪数据库中没有收到任何消息。帮助查找故障的唯一替代方法是使用 WCF 跟踪,但是虽然显示消息信封和标头,这很有帮助,但它不显示消息正文。
-
您是如何发现出了什么问题的?
标签: wcf logging biztalk trace system.diagnostics