2009-02-25 79 views
-1

有沒有人使用查詢語言來提取從Web服務返回的數據。從Web服務返回的數據集中提取數據

我寫了一個web服務返回的數據集,

[WebService(Namespace = "http://tempuri.org/")] 
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] 
[ToolboxItem(false)] 
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. 
// [System.Web.Script.Services.ScriptService] 
public class Service1 : System.Web.Services.WebService 
{ 

    [WebMethod] 
    public DataSet GetData() 
    { 
     AWDS ds = new AWDS();//AWDS is my dataset class name 
     SalesPersonTableAdapter ta = new SalesPersonTableAdapter(); 
     ta.Fill(ds.SalesPerson); 
     return ds; 
    } 
} 

我用這個查詢我的資源

<Query> 
<Method Namespace="http://tempuri.org/" Name="GetData"> 
</Method> 
<SoapAction>http://tempuri.org/GetData</SoapAction> 
</Query> 

「什麼此查詢語言名爲」

,但我得到發現數據集的架構(我的表列顯示爲記錄)。

我想了解更多如何獲取某個表的模式。

謝謝

回答

-1

請嘗試更清楚您的要求。我不知道你發佈的這個「查詢」XML是什麼。它根本不是查詢語言。

另外,您應該避免從Web服務返回DataSet。它不能與非.NET平臺進行互操作,有時也不能與.NET進行互操作。


我在MSDN上的xmlDP上發現了一些資源。見xmldp query syntax

我希望有幫助。

+0

好吧,這是一個名爲xmlDP查詢語言用於航行通過從Web服務返回WXL,我遇到一個缺乏的資源 – netseng 2009-02-25 12:13:05

0

轉到您的Web服務的URL並在其末尾添加?wsdl。

查找wsdl:定義並查看targetNamespace屬性。此值是方法命名空間屬性應設置爲您的查詢。

找到WSDL:操作元素,其屬性等於要使用,並期待在肥皂的方法:操作下方。看看soapAction屬性的值。這個值就是你在查詢中將要放置在SoapAction元素中的值。

另外,請參見以下內容:

Reporting Services: Using XML and Web Service Data Sources

XML Query Syntax for Specifying XML Report Data (SSRS)

相關問題