﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>IT博客-飘着的叶子，什么时候才落地-随笔分类-web 服务</title><link>http://www.cnitblog.com/piaoye12345/category/1073.html</link><description /><language>zh-cn</language><lastBuildDate>Tue, 27 Sep 2011 09:47:41 GMT</lastBuildDate><pubDate>Tue, 27 Sep 2011 09:47:41 GMT</pubDate><ttl>60</ttl><item><title>web 服务实现步骤</title><link>http://www.cnitblog.com/piaoye12345/archive/2005/11/28/4967.html</link><dc:creator>萌芽的叶子</dc:creator><author>萌芽的叶子</author><pubDate>Mon, 28 Nov 2005 07:52:00 GMT</pubDate><guid>http://www.cnitblog.com/piaoye12345/archive/2005/11/28/4967.html</guid><wfw:comment>http://www.cnitblog.com/piaoye12345/comments/4967.html</wfw:comment><comments>http://www.cnitblog.com/piaoye12345/archive/2005/11/28/4967.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/piaoye12345/comments/commentRss/4967.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/piaoye12345/services/trackbacks/4967.html</trackback:ping><description><![CDATA[1，新增一个项目－》新增页面时，选择web 服务－》修改该服务的名称－》确定<BR>2，打开该页面，点击“此处”，切换到代码页面<BR>3，你会看到如下的提示：<BR>&lt;System.Web.Services.WebService(Namespace := "<A href="http://tempuri.org/SMS/webService1">http://tempuri.org/SMS/webService1</A>")&gt; _<BR>.................................................<BR><BR>&nbsp;<FONT color=#000080> ' Web 服务示例<BR>&nbsp;&nbsp;&nbsp; ' HelloWorld() 示例服务返回字符串 Hello World。<BR>&nbsp;&nbsp;&nbsp; ' 若要生成项目，请取消注释以下行，然后保存并生成项目。<BR>&nbsp;&nbsp;&nbsp; ' 若要测试此 Web 服务，请确保 .asmx 文件是起始页<BR>&nbsp;&nbsp;&nbsp; ' 并按 F5 键。<BR>&nbsp;&nbsp;&nbsp; '<BR>'&nbsp;&lt;WebMethod()&gt; _<BR>&nbsp;&nbsp;'&nbsp; Public Function HelloWorld() As String<BR>&nbsp;&nbsp;&nbsp;'&nbsp;&nbsp;&nbsp;&nbsp; Return "Hello World"<BR>&nbsp;&nbsp;'&nbsp; End Function<BR><FONT color=#000000>4，你按照他的提示，把该web服务页设为起始页<BR></FONT></FONT><FONT color=#800080>&lt;WebMethod()&gt; _<BR>&nbsp;&nbsp; Public Function HelloWorld() As String<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Return "Hello World"<BR>&nbsp;&nbsp;End Function<BR></FONT><FONT color=#000000>5，并按 F5 键，运行，可以看到</FONT><FONT color=#800080>HelloWorld</FONT><FONT color=#000000>这个选项，如果你注释掉</FONT><FONT color=#800080>&lt;WebMethod()&gt; _</FONT><FONT color=#000000>就看不到该项，这是为了给调用该服务的人了解，该服务提供那些服务，供其他人使用。<BR>6，<A href="http://tempuri.org/SMS/webService1">http://tempuri.org/SMS/webService1</A>，这个地址可以修改，我修改为本机的IP地址，<A href="http://172.23.196.49/SMS/WebSignServiceClass">http://172.23.196.49/SMS/webService1</A>别人引用该地址就可以调用该服务提供的所有服务<BR>7，我试写一个正常的服务，<BR>
<DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #000000">&lt;</SPAN><SPAN style="COLOR: #000000">WebMethod()</SPAN><SPAN style="COLOR: #000000">&gt;</SPAN><SPAN style="COLOR: #000000">&nbsp;_<BR><IMG id=Codehighlighter1_20_889_Open_Image onclick="this.style.display='none'; Codehighlighter1_20_889_Open_Text.style.display='none'; Codehighlighter1_20_889_Closed_Image.style.display='inline'; Codehighlighter1_20_889_Closed_Text.style.display='inline';" src="http://www.cnitblog.com/images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_20_889_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_20_889_Closed_Text.style.display='none'; Codehighlighter1_20_889_Open_Image.style.display='inline'; Codehighlighter1_20_889_Open_Text.style.display='inline';" src="http://www.cnitblog.com/images/OutliningIndicators/ContractedBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN id=Codehighlighter1_20_889_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">Function&nbsp;GetFlowCode()</SPAN><SPAN id=Codehighlighter1_20_889_Open_Text><SPAN style="COLOR: #0000ff">Function</SPAN><SPAN style="COLOR: #000000">&nbsp;GetFlowCode(</SPAN><SPAN style="COLOR: #0000ff">ByVal</SPAN><SPAN style="COLOR: #000000">&nbsp;bl&nbsp;</SPAN><SPAN style="COLOR: #0000ff">As</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">String</SPAN><SPAN style="COLOR: #000000">)&nbsp;</SPAN><SPAN style="COLOR: #0000ff">As</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">String</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000">'</SPAN><SPAN style="COLOR: #008000">bl&nbsp;变量</SPAN><SPAN style="COLOR: #008000"><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/InBlock.gif" align=top></SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">Dim</SPAN><SPAN style="COLOR: #000000">&nbsp;myds&nbsp;</SPAN><SPAN style="COLOR: #0000ff">As</SPAN><SPAN style="COLOR: #000000">&nbsp;DataSet&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">New</SPAN><SPAN style="COLOR: #000000">&nbsp;DataSet<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/InBlock.gif" align=top><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">Dim</SPAN><SPAN style="COLOR: #000000">&nbsp;tt&nbsp;</SPAN><SPAN style="COLOR: #0000ff">As</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">String</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">%</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">&nbsp;bl.Trim&nbsp;</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">%</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mysql&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">SELECT&nbsp;DeptID,&nbsp;FlowKind,&nbsp;OrderID,&nbsp;CheckID&nbsp;FROM&nbsp;Flow&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mysql&nbsp;</SPAN><SPAN style="COLOR: #000000">&amp;=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">WHERE&nbsp;(1=1)&nbsp;AND&nbsp;((DeptID&nbsp;LIKE&nbsp;@DeptID)&nbsp;OR&nbsp;(FlowKind&nbsp;LIKE&nbsp;@FlowKind))&nbsp;ORDER&nbsp;BY&nbsp;DeptID,FlowKind,&nbsp;OrderID</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mycomm&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">New</SPAN><SPAN style="COLOR: #000000">&nbsp;SqlCommand(mysql,&nbsp;myconn1)<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/InBlock.gif" align=top><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mycomm.Parameters.Add(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">@FlowKind</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">,&nbsp;tt.Trim)&nbsp;</SPAN><SPAN style="COLOR: #008000">'</SPAN><SPAN style="COLOR: #008000">流程别</SPAN><SPAN style="COLOR: #008000"><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/InBlock.gif" align=top></SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mycomm.Parameters.Add(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">@DeptID</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">,&nbsp;tt.Trim)&nbsp;</SPAN><SPAN style="COLOR: #008000">'</SPAN><SPAN style="COLOR: #008000">部门ID</SPAN><SPAN style="COLOR: #008000"><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/InBlock.gif" align=top></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">Dim</SPAN><SPAN style="COLOR: #000000">&nbsp;myda&nbsp;</SPAN><SPAN style="COLOR: #0000ff">As</SPAN><SPAN style="COLOR: #000000">&nbsp;SqlDataAdapter&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">New</SPAN><SPAN style="COLOR: #000000">&nbsp;SqlDataAdapter(mycomm)<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">Try</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;myconn1.Open()<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;myda.Fill(myds)<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;myconn1.Close()<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">Catch</SPAN><SPAN style="COLOR: #000000">&nbsp;ex&nbsp;</SPAN><SPAN style="COLOR: #0000ff">As</SPAN><SPAN style="COLOR: #000000">&nbsp;Exception<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">If</SPAN><SPAN style="COLOR: #000000">&nbsp;myconn1.State&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;ConnectionState.Open&nbsp;</SPAN><SPAN style="COLOR: #0000ff">Then</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;myconn1.Close()<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">End</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">If</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">End</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">Try</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/InBlock.gif" align=top><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">Return</SPAN><SPAN style="COLOR: #000000">&nbsp;myds.GetXml<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/InBlock.gif" align=top><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">End&nbsp;Function</SPAN></SPAN></DIV></FONT>该服务是从数据库中读取一些必要的数据，转成xml字符串，供其他人调用该服务提供的数据。按 F5 键，运行正常。<BR>8，在要调用该服务的项目下，引用－》添加web引用，把这个服务的IP地址<A href="http://172.23.196.49/SMS/webService1">http://172.23.196.49/SMS/webService1</A>拷贝到URL中－》转倒成功－》修改web引用名（我的为默认Web References）－》添加引用<BR>9，调用该服务<BR>
<DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #008000">'</SPAN><SPAN style="COLOR: #008000">调用Web服务&nbsp;得到流程表&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000"><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">Dim</SPAN><SPAN style="COLOR: #000000">&nbsp;ws&nbsp;</SPAN><SPAN style="COLOR: #0000ff">As</SPAN><SPAN style="COLOR: #000000">&nbsp;WebSign.WebSignServiceClass&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">New</SPAN><SPAN style="COLOR: #000000">&nbsp;WebSign.WebSignServiceClass<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">Dim</SPAN><SPAN style="COLOR: #000000">&nbsp;str_result&nbsp;</SPAN><SPAN style="COLOR: #0000ff">As</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">String</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;ws.GetFlowCode(</SPAN><SPAN style="COLOR: #0000ff">Me</SPAN><SPAN style="COLOR: #000000">.TextBox1.Text.Trim)&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000">'</SPAN><SPAN style="COLOR: #008000">接收返回的XML文本</SPAN><SPAN style="COLOR: #008000"><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000">'</SPAN><SPAN style="COLOR: #008000">将XML文本导入已实例化的Dataset</SPAN><SPAN style="COLOR: #008000"><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">Dim</SPAN><SPAN style="COLOR: #000000">&nbsp;myds&nbsp;</SPAN><SPAN style="COLOR: #0000ff">As</SPAN><SPAN style="COLOR: #000000">&nbsp;DataSet&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">New</SPAN><SPAN style="COLOR: #000000">&nbsp;DataSet<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">Dim</SPAN><SPAN style="COLOR: #000000">&nbsp;stringreadr&nbsp;</SPAN><SPAN style="COLOR: #0000ff">As</SPAN><SPAN style="COLOR: #000000">&nbsp;System.IO.StringReader&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">New</SPAN><SPAN style="COLOR: #000000">&nbsp;System.IO.StringReader(str_result)<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">Dim</SPAN><SPAN style="COLOR: #000000">&nbsp;xmltextrder&nbsp;</SPAN><SPAN style="COLOR: #0000ff">As</SPAN><SPAN style="COLOR: #000000">&nbsp;System.Xml.XmlTextReader&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">New</SPAN><SPAN style="COLOR: #000000">&nbsp;System.Xml.XmlTextReader(stringreadr)<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;myds.ReadXml(xmltextrder)</SPAN></DIV><FONT color=#ff0000>该websign应该为WebReferences<BR></FONT>如果想绑定倒datagrid：<BR>&nbsp;Me.DataGrid1.DataSource = myds.Tables(0).DefaultView<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Me.DataGrid1.DataBind()<BR>基本如此，但是应该还有更深的web服务，希望和大家一起讨论<img src ="http://www.cnitblog.com/piaoye12345/aggbug/4967.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/piaoye12345/" target="_blank">萌芽的叶子</a> 2005-11-28 15:52 <a href="http://www.cnitblog.com/piaoye12345/archive/2005/11/28/4967.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>