?? debugging.asp
字號:
<html>
<head>
<title>David Carter-Tod: Debugging Client</title>
<meta name="description" content="Using XML within ASP pages">
<meta name="keywords" content="XML, XML-RPC, ASP, Active Server Pages, Internet Explorer, NT, Windows">
<meta name="generator" content="Frontier 6.0 Win95"></head>
<body bgcolor="#FFFFFF" alink="#008000" vlink="#800080" link="#0000FF">
<a href="http://www.chre.vt.edu/dtod/">David Carter-Tod</a> --> <a href="../default.asp">XML-RPC</a> --> Debugging Client
<HR noshade size=1>
<table border=0 width=100% cellpadding=10 cellspacing=5>
<tr>
<TD width=100 bgcolor="#EEEEEE" valign=top>
<font size="-1">
<h3>XML-RPC</H3>
- <a href="../default.asp">XML-RPC</a><P>
- <a href="../clientEg/aboutClient.asp">XML-RPC Client</a><P>
- <a href="../aboutServer.asp">XML-RPC Server</a><P>
- <a href="../download.asp">Download the Code</a><P>
<hr>
- <a href="../scriptingNews.asp">Scripting News via XML</a><P>
</font>
</td>
<td valign=top>
<h3>Debugging Client</h3>
<hr noshade>
<!--#include virtual="/dtod/xmlrpcb2/code/xmlrpc.asp" -->
<%
on error resume next
if NOT Request.form("who") = "" then
Dim paramList(1)
paramList(0)=Request.form("who")
Response.write("<pre>" & Replace(functionToXML("helloWorld", paramList), "<", "<", 1, -1, 1) & "</pre>")
myresp = xmlRPC ("http://www.wc.cc.va.us/dtod/xmlrpcb2/code/server.asp", "helloWorld", paramList)
response.write(myresp & "<p>")
Response.write("<pre>" & Replace(serverResponseText, "<", "<", 1, -1, 1) & "</pre>")
end if
if err.number <>0 then
response.write("Error number: " & err.number & "<P>")
response.write("Error description: " & err.description & "<P>")
else
response.write(myresp)
end if
%>
<form method=post action=debugging.asp>
Type your name and say hello -- this time you'll see the XML passed back and forth: <input type=text name=who><p>
<input type=submit value="Say Hello">
</form>
<hr>
<h3>The Code</H3>
Let's say that the code wasn't working. There are obviously a number of places where you can look, but it's nice to be able to look at what you're passing to and getting from the server. You can do that, and you should also put error handlers in:<P>
<font size=-1><pre>
<!--#include virtual="/dtod/xmlrpcb2/code/xmlrpc.asp" -->
<%
on error resume next
if NOT Request.form("who") = "" then
Dim paramList(1)
paramList(0)=Request.form("who")
' WHAT AM I SENDING TO THE SERVER
Response.write("<pre>" & Replace(functionToXML("helloWorld", paramList), "<", "&lt;", 1, -1, 1) & "</pre>")
myresp = xmlRPC ("http://www.wc.cc.va.us/dtod/xmlrpcb2/code/server.asp", "helloWorld", paramList)
response.write(myresp & "<p>")
' WHAT AM I GETTING FROM THE SERVER
Response.write("<pre>" & Replace(serverResponseText, "<", "&lt;", 1, -1, 1) & "</pre>")
end if
if err.number <>0 then
response.write("Error number: " & err.number & "<P>")
response.write("Error description: " & err.description & "<P>")
else
response.write(myresp)
end if
%>
</pre></font>
<ul>
<li><a href="../clientEg/helloWorld.asp">Hello World</a>
<li><a href="../clientEg/bettygetStateName.asp">Get State Name</a>
<li><a href="../clientEg/bettyGetStateStruct.asp">Get State Struct</a>
<li><a href="../clientEg/bettygetStateList.asp">Get State List</a>
<li><a href="../clientEg/superHello.asp">Hello World Again</a>
<li><a href="../clientEg/bettyerror.asp">Error Example</a>
<li><a href="../clientEg/debugging.asp">Debugging Client</a>
</ul>
</td>
</tr>
</table>
<HR noshade size=1>
<p align=right>
E-mail: <a href="mailto:dtod@vt.edu">dtod@vt.edu</a>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -