I am using SSRS SDK for PHP
PHP version 5.4
WebServer: Centos 6.4
MSSQL Server 2008 R2
When i do
$ssrs_report = new SSRSReport(new Credentials(UID, PASWD), SERVICE_URL);
I got the following error:
Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://172.16.4.63/ReportServerURL/Pages/ReportViewer.aspx?%2fTestFolder%2ftestClaimHdr&rs:Command=Render/ReportExecution2005.asmx?wsdl' : Premature end of data in tag html line 1 in /var/www/emilio/app/Libraries/SSRSReport/bin/SSRSReport.php:196 Stack trace:
I am looking for how to fix this and get a report through soap ( SSRS SDK for PHP ).
I tried using file_get_content()
and curl
, and both worked fine, then this is not a connection problem, I have
- Soap Client Enabled
- allow_url_fopen is enabled
this is the line where sdk calls the soap service
$executionServiceUrl="http://172.16.4.63/ReportServerURL?%2fTestFolder%2ftestClaimHdr&rs:Command=Render/ReportExecution2005.asmx?wsdl"; $options = array ( 'login' => 'xxxx\\xxxx', 'password' => 'xxxx', ) $this->_soapHandle_Exe = new SoapClient($executionServiceUrl, $options);
Adding
try { $this->_soapHandle_Exe = new SoapClient($executionServiceUrl, $options); } catch (Exception $e) { var_export(libxml_get_last_error()); }
I get the following array:
LibXMLError::__set_state(array( 'level' => 3, 'code' => 77, 'column' => 43325, 'message' => 'Premature end of data in tag html line 1', 'file' => 'http://172.16.4.63/ReportServerURL?%2fTestFolder%2ftestClaimHdr&rs:Command=Render/ReportExecution2005.asmx?WSDL', 'line' => 1, )
According to xmlerror from libxml2
Level 3 = XML_ERR_FATAL = 3: Fatal Error
code 77 = XML_ERR_TAG_NOT_FINISHED = 77: 77
I have alredy set Basic authentication to SSRS SERVER
Update
Like @ jwhaley58 said I changed to:
define("SERVICE_URL", "http://172.16.4.63/ReportServerURL"); $ssrs_report = new SSRSReport(new Credentials(UID, PASWD), SERVICE_URL); $ssrs_report->LoadReport2('testClaimHdr',NULL);
and I get:
Fatal error: Uncaught exception 'SSRSReportException' in /var/www/emilio/app/Libraries/SSRSReport/bin/SSRSReport.php:590 Stack trace: #0 /var/www/emilio/app/Libraries/SSRSReport/bin/SSRSReport.php(326): SSRSReport->ThrowReportException(Object(SoapFault)) #1 /var/www/emilio/SSRS/index.php(15): SSRSReport->LoadReport2('testClaimHdr', NULL) #2 {main} thrown in /var/www/emilio/app/Libraries/SSRSReport/bin/SSRSReport.php on line 590