我必须为 Jasper 报告编写 PHP 前端。我可以使用 jasper REST 调用成功连接到服务器、验证和查看存储库。但是,当我尝试访问报告时,响应正文中出现以下错误:
未找到报告(在会话中未找到 uuid)
php代码如下:
$uri = "http://localhost:8080/jasperserver/rest/report/samples/Client_Information_Report?RUN_OUTPUT_FORMAT=html";
//PUT request to run the report
$response = Httpful\Request::put($uri, $payload)
->authenticateWith("jasperadmin", "jasperadmin")
->send();
$xml = new SimpleXMLElement($response->body);
$uuid = (String)$xml->uuid; //The uuid is successfully returned
$uri = "http://localhost:8080/jasperserver/rest/report/$uuid?file=report";
$report = Httpful\Request::get($uri)
->authenticateWith("jasperadmin", "jasperadmin")
->send();
我能够确认第一个 PUT 返回了一个 uuid。我在这里有什么遗漏吗?任何帮助表示赞赏。