ReportingService2010.GetDataSourceContents Yöntemi
Bir veri kaynak içeriğini döndürür.
Ad Alanı: ReportService2010
Derleme: ReportService2010 (ReportService2010 içinde.dll)
Sözdizimi
'Bildirim
<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/GetDataSourceContents", RequestNamespace := "https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer", _
ResponseNamespace := "https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer", _
Use := SoapBindingUse.Literal, ParameterStyle := SoapParameterStyle.Wrapped)> _
<SoapHeaderAttribute("TrustedUserHeaderValue")> _
<SoapHeaderAttribute("ServerInfoHeaderValue", Direction := SoapHeaderDirection.Out)> _
Public Function GetDataSourceContents ( _
DataSource As String _
) As DataSourceDefinition
'Kullanım
Dim instance As ReportingService2010
Dim DataSource As String
Dim returnValue As DataSourceDefinition
returnValue = instance.GetDataSourceContents(DataSource)
[SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/GetDataSourceContents", RequestNamespace = "https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer",
ResponseNamespace = "https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer",
Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
[SoapHeaderAttribute("TrustedUserHeaderValue")]
[SoapHeaderAttribute("ServerInfoHeaderValue", Direction = SoapHeaderDirection.Out)]
public DataSourceDefinition GetDataSourceContents(
string DataSource
)
[SoapDocumentMethodAttribute(L"https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/GetDataSourceContents", RequestNamespace = L"https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer",
ResponseNamespace = L"https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer",
Use = SoapBindingUse::Literal, ParameterStyle = SoapParameterStyle::Wrapped)]
[SoapHeaderAttribute(L"TrustedUserHeaderValue")]
[SoapHeaderAttribute(L"ServerInfoHeaderValue", Direction = SoapHeaderDirection::Out)]
public:
DataSourceDefinition^ GetDataSourceContents(
String^ DataSource
)
[<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/GetDataSourceContents", RequestNamespace = "https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer",
ResponseNamespace = "https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer",
Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)>]
[<SoapHeaderAttribute("TrustedUserHeaderValue")>]
[<SoapHeaderAttribute("ServerInfoHeaderValue", Direction = SoapHeaderDirection.Out)>]
member GetDataSourceContents :
DataSource:string -> DataSourceDefinition
public function GetDataSourceContents(
DataSource : String
) : DataSourceDefinition
Parametreler
- DataSource
Tür: System.String
Tam url veri kaynak dosya adı ve .rsds veya .odc dosya adı uzantısı da dahil olmak üzere.
Dönüş Değeri
Tür: ReportService2010.DataSourceDefinition
A DataSourceDefinition nesne için veri kaynak bağlantı özelliklerini içerir
Açıklamalar
Aşağıdaki tablo üstbilgi ve izinler bu işlemi gösterir.
soap üstbilgisi kullanımı |
(Giden)ServerInfoHeaderValue |
Yerel mod gerekli izinleri |
|
SharePoint modu gerekli izinleri |
OpenItems() |
Örnekler
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
class Sample
{
static void Main(string[] args)
{
ReportingService2010 rs = new ReportingService2010();
rs.Url = "http://<Server Name>" +
"/_vti_bin/ReportServer/ReportService2010.asmx";
rs.Credentials =
System.Net.CredentialCache.DefaultCredentials;
DataSourceDefinition definition = null;
try
{
definition = rs.GetDataSourceContents(
"http://<Server Name>/Docs/Documents/" +
"Data Sources/AdventureWorks.rsds");
Console.WriteLine("Connection String: {0}",
definition.ConnectString);
Console.WriteLine("Extension name: {0}",
definition.Extension);
}
catch (SoapException e)
{
Console.WriteLine(e.Detail.InnerXml.ToString());
}
}
}
Imports System
Imports System.IO
Imports System.Text
Imports System.Web.Services
Imports System.Web.Services.Protocols
Class Sample
Public Shared Sub Main()
Dim rs As New ReportingService2010()
rs.Url = "http://<Server Name>" + _
"/_vti_bin/ReportServer/ReportService2010.asmx"
rs.Credentials = _
System.Net.CredentialCache.DefaultCredentials
Dim definition As DataSourceDefinition = Nothing
Try
definition = _
rs.GetDataSourceContents("http://<Server Name>" + _
"/Docs/Documents/Data Sources/AdventureWorks.rsds")
Console.WriteLine("Connection String: {0}", _
definition.ConnectString)
Console.WriteLine("Extension name: {0}", _
definition.Extension)
Catch e As SoapException
Console.WriteLine(e.Detail.InnerXml.ToString())
End Try
End Sub
End Class