gpt4 book ai didi

java - 使用 Java 访问 OBIEE 演示服务器 URL

转载 作者:行者123 更新时间:2023-12-01 09:09:44 25 4
gpt4 key购买 nike

我正在尝试模拟 OBIEE 服务器中的一个用户,该用户在浏览器中运行良好。网址: http://SRVR:port/analytics/saw.dll?Dashboard&NQUser=Admin&NQPassword=AdminPasswd&Impersonate=impersonateUser我使用 Java 访问该 URL 以从服务器获取一些响应,但出现错误:HTTP 代码为 200 &Oracle BI 演示服务不支持您的浏览器

Java代码

>Client client = Client.create();
>WebResource webResource =
> client.resource("http://SRVR:port/analytics/saw.dll?Dashboard&NQUser=Admin&NQPassword=AdminPasswd&Impersonate=impersonateUser");
> ClientResponse response =
> webResource.accept("application/json").get(ClientResponse.class);
> System.out.println(response.getStatus());
> System.out.println(ClientResponse.Status.fromStatusCode(response.getStatus()));
> String output = response.getEntity(String.class);
> System.out.println("Output from Server .... \n");
> System.out.println(output);

最佳答案

因此它正在确认资源的存在,但需要浏览器。或者您可以欺骗认为该请求源自浏览器内部。

您可能需要剖析以下情况中发生的事情:webResource.accept().get()然后,检索来自浏览器的完整 GET 请求。欺骗它是如何在您的 Web 服务调用中构建的。

此外,您是否考虑过使用 GO URL

关于java - 使用 Java 访问 OBIEE 演示服务器 URL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40995275/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com