[英]an unexpected HTTP status code was returned by the server
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.我的 jasper 报告有问题,他们在 jasper 服务器上使用 jaspersoft/rest-client 将它们集成到我的 php 应用程序中。 (wamp: php:5.6.31,mySql 5.7.19)(Jasperserver 6.6) (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 "我希望看到我的报告,但实际上我只有异常“服务器返回了意外的 HTTP 状态代码”
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:
在某些情况下,expectedStatusCodes 不会作为超时或进程终止的示例在响应中重新调整。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.