給我們的應用的“App.exe.config”配置文件添加下面的粗字體:
one ui 2.0。
<configSections>
esw和wset的區別,
?????? <section name="microsoft.web.services2" type="Microsoft.Web.Services2.Configuration.WebServicesConfiguration, Microsoft.Web.Services2, Version=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>subscribe</wsa:Action> ?<wsa:From> ? <wsa:Address>soap.tcp://10.168.3.16:82/oo</wsa:Address> ? </wsa:From> ? <wsa:MessageID>uuid:85a22229-282c-4a66-ae02-571af9285485</wsa:MessageID> ?<wsa:ReplyTo> ? <wsa:Address>soap.tcp://10.168.3.16:82/oo</wsa:Address> ? </wsa:ReplyTo> ? <wsa:To>soap.tcp://10.168.3.16:90/kk</wsa:To> ?<wsse:Security> ?<wsu:Timestamp wsu:Id="Timestamp-d87cb1ae-e28d-4bd7-b77d-3e7d7b634357"> ? <wsu:Created>2003-04-04T06:41:47Z</wsu:Created> ? <wsu:Expires>2003-04-04T06:46:47Z</wsu:Expires> ? </wsu:Timestamp> ? </wsse:Security> ? </soap:Header> ?<soap:Body> ?<x:register xmlns:x="urn:ClientSubscriptionApp:Subscription"> ? <name>RequestHandler.RequestRoute</name> ? </x:register> ? </soap:Body> ? </soap:Envelope></log>
? ? |
?當你調試WSE時,可以啟用這個功能,將對你的調試工作起到極大的促進作用!
?編寫者:鄭昀@UltraPower