I have a problem with my jasper report who are on a jasper server for integrate them in my php application with jaspersoft/rest-client. (wamp: php:5.6.31,mySql 5.7.19)(Jasperserver 6.6)
require_once __DIR__ . "/vendor/autoload.php";
use Jaspersoft\Client\Client;
use Jaspersoft\Exception\RESTRequestException;
try{
$c = new Client(
"http://localhost:8081/jasperserver-pro",
"superuser",
"superuser",
"organization_1"
);
$report = $c->reportService()->runReport('/reports/Blank_A4_1', 'html');
echo $report;
} catch (RESTRequestException $e) {
echo 'RESTRequestException:';
echo '</br>Exception message: ', $e->getMessage(), "\n";
echo '</br>Set parameters: ';
var_dump($e->parameters);
echo '</br>Expected status code:';
var_dump($e->expectedStatusCodes);
echo '</br>Error code: ', $e->errorCode, "\n";
}
I expected to see my report but actually I just have the exception "An unexpected HTTP status code was returned by the server "
The exact echo is :
RESTRequestException:
Exception message: An unexpected HTTP status code was returned by the server
Set parameters:
C:\wamp64\www\TestBI\index.php:29:null
Expected status code:
C:\wamp64\www\TestBI\index.php:31:
array (size=1)
0 => int 200
Error code: