I am new to using web servicesunder powershell, so maybe I have a major misunderstanding. I work with Microsoft Reporting Services. Here is a reproduction of the script.
$computer = "rptdev"
$uri = "http://$($computer)/ReportServer/ReportService.asmx?WSDL"
$reporting = New-WebServiceProxy -uri $uri -UseDefaultCredential -namespace "ReportingWebService"
$dsRef = new-object ReportingWebService.DataSourceReference
$ds = new-object ReportingWebService.DataSource
$dsRef.GetType()
$ds.GetType()
If I run this, I get something more or less like this:
Name BaseType
---- --------
DataSourceReference ReportingWebService.DataSourceDefinitionOrReference
DataSource System.Object
So my question is: why does the DataSource have System.Objectlike BaseTypewhen DataSourceReferenceexplicitly has an object type that is based on a web object? They were created from the namespace ReportingWebService, right?
My problem with the root is that I need to pass the array DataSourcesback to SetItemDataSources, and SetItemDataSourcespinches the array from System.Objects, and I can't seem to drop it what I want.