[英]can you help me with this error jrs-rst php client v2
Fatal error: Uncaught exception 'Jaspersoft\Exception\RESTRequestException' with message 'An unexpected HTTP status code was returned by the server' in C:\wamp\www\new_hris\vendor\jaspersoft\rest-client\src\Jaspersoft\Tool\RESTRequest.php:364
Stack trace:
#0 C:\wamp\www\new_hris\vendor\jaspersoft\rest-client\src\Jaspersoft\Tool\RESTRequest.php(451): Jaspersoft\Tool\RESTRequest->handleError(404, Array, '<html><head><ti...')
#1 C:\wamp\www\new_hris\vendor\jaspersoft\rest-client\src\Jaspersoft\Client\Client.php(158): Jaspersoft\Tool\RESTRequest->prepAndSend('http://localhos...', Array, 'GET', NULL, true, 'application/jso...', 'application/jso...')
#2 C:\wamp\www\new_hris\report.php(14): Jaspersoft\Client\Client->serverInfo() #3 {main} thrown in C:\wamp\www\new_hris\vendor\jaspersoft\rest-client\src\Jaspersoft\Tool\RESTRequest.php on line 364"
I got this error and I dont know how to debug it. 我收到此错误,我不知道如何调试它。
by the way this is my code below: 顺便说一下,这是我的代码如下:
require_once("vendor/autoload.php");
use Jaspersoft\Client\Client;
$c = new Client(
"http://localhost:3307/jasperserver",
"jasperadmin",
"password"
);
$js = $c->jobService();
$c->setRequestTimeout(60);
$info = $c->serverInfo();
$report = $c->reportService()->runReport('/reports/samples/AllAccounts', 'html');
I recommended you that call the report by uri. 我建议您通过uri致电报告。 Example: http://ip:8080/jasperserver/flow.html?_flowId=viewReportFlow&standAlone=true&_flowId=viewReportFlow&ParentFolderUri=%2Freports%2Fviaticos&reportUnit=%2Freports%2Fviaticos%2FrptOrdenMovilizacionByCar&j_username=jasperreportadmin&j_password=jasperreportadmin&P_FECHA1=02/08/2016&P_FECHA2=25/08/2016&P_VEH_CODIGO=52&output=pdf 示例: http:// ip:8080 / jasperserver / flow.html?_flowId = viewReportFlow&standAlone = true&_flowId = viewReportFlow&ParentFolderUri =%2Freports%2Fviaticos&reportUnit =%2Freports%2Fviaticos%2FrptOrdenMovilizacionByCar&ja_perper_s_report_ja_perper_s_per_s_per_s_per_s2_per_s_per_s_per_s_per_s_perper_s_per_s2_pera_ja_perpers_ja_perper_s_per_s_perper_s_perper_s_a_perper_s_perper_s_aper_s_perper_s2_pera_ja_perpers_ja 2016&P_VEH_CODIGO = 52&输出= PDF
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.