C# SSRS php库SetItemDataSources,输入结构中缺少必需的字段项
在PHP中, 使用通过composer安装的SSRS Reporting services库:chriskl/phpssrs“^0.1.2 在成功调用C# SSRS php库SetItemDataSources,输入结构中缺少必需的字段项,c#,php,reporting-services,C#,Php,Reporting Services,在PHP中, 使用通过composer安装的SSRS Reporting services库:chriskl/phpssrs“^0.1.2 在成功调用CreateCatalogItem(…)并看到该报表存在于SQL Server Reporting Services中后,我在运行SetItemDataSources(…)时遇到一个错误(下面列出了消息和堆栈跟踪) 同事能够正确运行调用,但其他两个环境也会因相同错误而失败。因此,这看起来可能是一个环境问题,并要求任何帮助,指向我们可能是什么,或其他
CreateCatalogItem(…)
并看到该报表存在于SQL Server Reporting Services中后,我在运行SetItemDataSources(…)
时遇到一个错误(下面列出了消息和堆栈跟踪)
同事能够正确运行调用,但其他两个环境也会因相同错误而失败。因此,这看起来可能是一个环境问题,并要求任何帮助,指向我们可能是什么,或其他
错误状态
“输入结构中缺少必需的字段项”
因此,我们认为这可能是一个版本控制问题,其中一个版本的SSRS服务正在寻找一个条目字段,而我们正在使用的库没有提供它
SOAP调用的内容不包含名为Item的元素
以下是失败的代码:
$connName = 'MyConnName';
$dsd = new DataSourceDefinition(
'SQL', //Extension
null, //ConnectString
true, //UseOriginalConnectString
true, //$OriginalConnectStringExpressionBased
'Integrated', //$CredentialRetrieval
false, //$WindowsCredentials
false, //$ImpersonateUser
"Specify a user name and password for data source {$connName}:", //$Prompt
null, //$UserName
null, //Password
true //Enabled
);
$ds = new DataSource(
$connName,
null,
null,
$dsd
);
$sids = new SetItemDataSources($path . $name, [$ds]);
$rs->SetItemDataSources($sids);
这是调用生成的错误(异常):
System.Web.Services.Protocols.SoapException:输入结构中缺少必需的字段项。-->Microsoft.ReportingServices.Diagnostics.Utilities.MissingElementException:输入结构中缺少必需的字段项。位于Microsoft.ReportingServices.Library.ReportingServices 2005Impl.SetItemDataSources(String项,DataSource[]DataSources,Guid batchId),位于Microsoft.ReportingServices.Library.ReportingServices 2005Impl.SetItemDataSources(String项,DataSource[]DataSources),位于Microsoft.ReportingServices.WebServer.ReportingServices 2010.SetItemDataSources(字符串ItemPath,数据源[]数据源)