I'm using SSRS SDK for PHP
PHP Version 5.4
WebServer: Centos 6.4
MSSQL Server 2008 R2
When I make
$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: #0 /var/www/emilio/app/Libraries/SSRSReport/bin/SSRSReport.php(196):
SoapClient->SoapClient('http://172.16.4...', Array) #1 /var/www/emilio/SSRS/index.php(12):
SSRSReport->SSRSReport(Object(Credentials), 'http://172.16.4...') #2 {main} thrown in
/var/www/emilio/app/Libraries/SSRSReport/bin/SSRSReport.php on line 196
I'm looking how to fix it and get the report trough the soap(SSRS SDK for PHP).
I tried using file_get_content()
and curl
and both worked fine, then isn't connection problems, I have
- Soap Client enabled
- allow_url_fopen is On
this is the line where the sdk call 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 : A fatal error
code 77 = XML_ERR_TAG_NOT_FINISHED = 77 : 77
I have alredy set the Basic authentication in the SSRS SERVER
Update
As @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
See Question&Answers more detail:
os