Apply WSDK - Appendix how to use SOAP TRACE Utility for debugging
Mood
2002-12-05
Article Type: Overview
Difficult Level: 3/9
Version: 1.20
This appendix is to illustrate, how we will see how the Web Services Client and Web Services Server is exchanged during Web Services Client and Web Services Server to help programmers understand how the program is running.
The examples used in the appendix are based on the third article of the application WSDK series: the digital signature of the Web Services. The first article is also about SOAP TRACE Utility, but I don't know why, I have not been approved by 9CBS.
£ 附 附 附 附 环境 m m m m m m m 3 m 3 3 3 3 3 3 3
u Install Microsoft SOAP Toolkit Version 3
£ If you do not install the software, please go to the link below to do Download.
u Run SOAP TRACE UTILITY
£ Click the Start Start menu, click All Programs, click Microsoft SOAP Toolkit Version 3, then select Trace Utility.
£ TRACE UTILITY program After selecting File from the menu, select New, then click Formatted TRACE.
£ Accept default settings. The default settings open a TCP / IP's Socket port in the 8080 port of MSSOAPT.exe. All TCP / IP requests will be redirected to the host and Port. As the default, all requests will be transferred to this unit's web server. Of course, you can also transfer requests to other machines, especially when debugging on a machine is very useful.
£ Click OK. Now MSSoApt.exe starts to listen to the 8080 port.
Uchange the client to go through mssoapt.exe
£ Opens the project that calls the Web Service client in Visual Studio .NET.
£ Under the Solution Explorer toolbar, select the node representing this project and right click, then select Add, then click Add New Item.
£ Select Text File in the type of dialog. Then in the Name text box, type app.config.
£ Click Open.
£ in app.config: Add the following code
Value = "http: // localhost: 8080 / myproject / wsdk / signsoapusingname / signsoapusingname.asmx" /> appsettings> configure> Save this file and run. Visual Studio .NET copies the app.config file to the same directory of the client executable file SIGNSOAPUSINGNAME.EXE. App.config will be copied and automatically renamed as signsoapusingname.exe.config. Execution The file will read the configuration information under the AppSettings node in the sigNSoApusingName.exe.config file. If the client generates a proxy class (Proxy) that calls Web Services, we will add code in the proxy class constructor to read our added configuration information from a configuration file: public service1 () { String urlsetting = System.configuration. ConfigurationSettings.AppSettings ["SecurityURL"]; IF ((UrlSetting! = NULL) { this.url = urlsetting; } Else { THIS.URL = "http://localhost/myproject/wsdk/signsoapusingname/signsoapusingname.asmx"; } } No App.config before, the agent class constructor always executes the code in the ELSE clause. Now SIGNSOAPUSINGNAME .EXE.CONFIG exists, the IF statement will be executed first. £ Run SIGNSOAPUSINGNAME .EXE (or press F5). £ Switch to MSSoApt.exe. Use this tool, you can see the change of the SOAP message in the Message # n node. See any HTTP header change in the httpheaders header. You can also see the change in binary system in the binary node. Latest news, you can get the latest WSDK version to the address below, it is now renamed WSE: Web Services Enhancements 1.0 for Microsoft .NET especially: This article original, 9CBS signature start, all text and photo copyright. Do not propagate, reprint, or adaptation without authorization. If you have any questions or suggestions, please email new2001@msn.com Welcome to my Website: www.dotnettools.org