我正在使用 Docusign API 创建和检索用于签名的“信封”。 (docusign.com 了解更多信息)。
基本上,我在尝试根据他们的指示获取 SOAP 跟踪时遇到一些问题 https://github.com/docusign/DocuSign-eSignature-SDK/wiki/How-to-acquire-a-SOAP-trace-for-debugging-%28Windows%29
这就是我需要帮助的地方。有没有人使用来自文档支持的这些说明(来自 Microsoft 页面,根据社区评论,似乎不起作用)能够创建跟踪?
我已经尝试了所有可能的组合,但到目前为止我没有看到任何日志文件创建。
我非常感谢您为我提供的任何帮助。
谢谢
最佳答案
这是我在 DocuSign 的 App.config 中使用的跟踪配置。您需要稍微清理一下日志(在每次调用之前/之后查找“<<<”和“">>>”。
首先将其添加到 system.serviceModel
部分:
<diagnostics>
<messageLogging
logEntireMessage="true"
logMalformedMessages="true"
logMessagesAtServiceLevel="true"
logMessagesAtTransportLevel="true"
maxMessagesToLog="50"
maxSizeOfMessageToLog="500000000" />
</diagnostics>
然后将其添加到配置
部分:
<system.diagnostics>
<trace autoflush="true" />
<sources>
<source name="System.Net" tracemode="protocolonly" maxdatasize="52428800" >
<listeners>
<add name="MyTraceFile"/>
</listeners>
</source>
</sources>
<sharedListeners>
<!-- Set path here. Make sure the app has permission to write to the location.-->
<add
name="MyTraceFile"
type="System.Diagnostics.TextWriterTraceListener"
initializeData="c:\temp\DsTrace.log" />
</sharedListeners>
<switches>
<add name="System.Net" value="Verbose" />
</switches>
</system.diagnostics>
还有一点需要注意的是,如果您在发送跟踪之前从跟踪中删除 PDFBytes
元素,DocuSign 工作人员将非常感激,除非您需要让他们进行故障排除。
关于soap - 获取用于调试的 SOAP 跟踪不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6473842/