`

[dotNET]如何启用WSE2.0的强大的Trace功能

 
阅读更多
<iframe align="center" marginwidth="0" marginheight="0" src="http://www.zealware.com/csdnblog336280.html" frameborder="0" width="336" scrolling="no" height="280"></iframe>

如何启用WSE2.0Trace功能

摘要:郑昀@UltraPower 简单介绍了使用了WSE2.0的应用程序如何启用WSE2.0自身Trace

给我们的应用的“App.exe.config”配置文件添加下面的粗字体:

configSections>

section name="microsoft.web.services2" type="Microsoft.Web.Services2.Configuration.WebServicesConfiguration, Microsoft.Web.Services2, Version=<chsdate w:st="on" year="1899" month="12" day="30" islunardate="False" isrocdate="False"></chsdate>2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />

configSections>

microsoft.web.services2>

diagnostics>

trace enabled="true" input="InputTrace.xml" output="OutputTrace.xml" />

detailedErrors enabled="true" />

diagnostics>

microsoft.web.services2>

这样,重启了服务之后,如果有进出的SOAP消息,可以在服务本目录下看到有“InputTrace.xml”“OutputTrace.xml”

这两个文件就自动记录了进出的SOAP完整包。

InputTrace.XML的内容示范如下,第一个包就是发送了一个对111的查询请求:

xml version="1.0" encoding="utf-8" ?>

log>

soap:Envelope

xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401

-wss-wssecurity-secext-1.0.xsd"

xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401

-wss-wssecurity-utility-1.0.xsd"

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

soap:Header>

wsa:Action>subscribewsa:Action>

wsa:From>

wsa:Address>soap.tcp://10.168.3.16:8082/oowsa:Address>

wsa:From>

wsa:MessageID>uuid:<chmetcnv w:st="on" unitname="a" sourcevalue="85" hasspace="False" negative="False" numbertype="1" tcsc="0"></chmetcnv>85a22229<chmetcnv w:st="on" unitname="C" sourcevalue="282" hasspace="False" negative="True" numbertype="1" tcsc="0"></chmetcnv>-282c<chmetcnv w:st="on" unitname="a" sourcevalue="4" hasspace="False" negative="True" numbertype="1" tcsc="0"></chmetcnv>-4a66-ae02-571af9285485wsa:MessageID>

wsa:ReplyTo>

wsa:Address>soap.tcp://10.168.3.16:8082/oowsa:Address>

wsa:ReplyTo>

wsa:To>soap.tcp://10.168.3.16:9090/kkwsa:To>

wsse:Security>

wsu:Timestamp wsu:Id="Timestamp-d87cb1ae-e28d-4bd7-b77d-3e7d7b634357">

wsu:Created><chsdate w:st="on" year="2003" month="4" day="4" islunardate="False" isrocdate="False"></chsdate>2003-04-04T06:41:47Zwsu:Created>

wsu:Expires><chsdate w:st="on" year="2003" month="4" day="4" islunardate="False" isrocdate="False"></chsdate>2003-04-04T06:46:47Zwsu:Expires>

wsu:Timestamp>

wsse:Security>

soap:Header>

soap:Body>

x:register xmlns:x="urn:ClientSubscriptionApp:Subscription">

name>RequestHandler.RequestRoutename>

mobile>111mobile>

x:register>

soap:Body>

soap:Envelope>log>

当你调试WSE时,可以启用这个功能,将对你的调试工作起到极大的促进作用!

当你调试WSE时,可以启用这个功能,将对你的调试工作起到极大的促进作用!

编写者:郑昀@UltraPower




分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics