chriskl/phpssrs

PHP SQL Server Reporting Services 客户端库

v0.1.2 2013-10-13 02:30 UTC

This package is not auto-updated.

Last update: 2024-09-23 15:38:43 UTC


README

具体 SoapClient 子类,用于访问所有四个 SQL Server Reporting Services 端点

另请参阅:TechNet 上的报告服务器 Web 服务端点

贡献者

最初由 Chris Kings-Lynne 开发,https://github.com/chriskl/phpssrs

非常欢迎拉取请求,该项目仍在为内部项目快速开发中。请发送针对 dev 分支的请求。

SSRS 认证

为此库工作,您可能需要启用报告服务器的基本认证。您通常需要编辑 C:\Program Files\Microsoft SQL Server\MSRS10_50\Reporting Services\ReportServer\rsreportserver.config 文件并添加以下内容

<AuthenticationTypes>
  <!-- Existing authentication methods here, eg. NTLM, Kerberos -->
  <RSWindowsBasic/>
</AuthenticationTypes>

然后重启 Reporting Services。

请注意,基本认证会在网络上明文发送您的密码,因此请仅通过 SSL 或安全内部报告服务器进行连接。

示例用法

<?php
use \PhpSsrs\ReportingService2010\ReportingService2010;
use \PhpSsrs\ReportingService2010\CreateFolder;

// Replace WSDL URL with your URL, or even better a locally saved version of the file.
$rs = new ReportingService2010([
    'soap_version' => SOAP_1_2,
    'compression' => true,
    'exceptions' => true,
    'cache_wsdl' => WSDL_CACHE_BOTH,
    'keep_alive' => true,
    'features' => SOAP_SINGLE_ELEMENT_ARRAYS & SOAP_USE_XSI_ARRAY_TYPE,
    'login' => 'DOMAIN\\samaccountname',
    'password' => '###########'
], 'http://<ssrs server>/ReportServer/ReportService2010.asmx?wsdl');

$request = new CreateFolder('Test Folder', '/', []);
$response = $this->rs->CreateFolder($request);

命名空间

可用的 SOAP 客户端有

  • \PhpSsrs\ReportExecutionService\ReportExecutionService
  • \PhpSsrs\ReportingService2005\ReportingService2005
  • \PhpSsrs\ReportingService2006\ReportingService2006
  • \PhpSsrs\ReportingService2010\ReportingService2010