iOrderID = Convert.ToInt32(txtOrderID.Text);
localhost.MyWebService proxy =
new localhost.MyWebService();
object[] results;
results = proxy.CustOrdersDetail(iOrderID,
out returnValue);
System.Xml.XmlElement result;
result = (System.Xml.XmlElement) results[j];
txtResponse.Text = result.OuterXml.ToString();
}
(VB.Net code)
Private Sub btnRequest_Click _
(ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles btnRequest.Click
Dim iOrderID As Int32
Dim returnValue As Int16 = 0
Dim j As Int16
Dim proxy As New localhost.MyWebService()
Dim results As New Object()
Dim result As System.Xml.XmlElement
iOrderID = Convert.ToInt32(txtOrderID.Text)
results = proxy.CustOrdersDetail _
(iOrderID, returnValue)
result = results(j)
SQLXML 和完整的VS.Net Web 服务相比还是很有限的。例如,产生SQLXML的Web 服务不能应用一个XSLT样式表到XML数据或编程处理数据来直接输出HTML到你的客户端应用程序中。本质上,SQLXML方法要求你把你的事务层和数据层联系起来,以便有效的从你的客户端应用程序中封装程序逻辑。返回的数据结果可能是很难维护的并且不是非常容易移植到新的工具或者平台上。