0
java를 사용하여 csv로 OBI 보고서를 다운로드해야합니다. 내가 브라우저에서 Java를 사용하여 Oracle Business Intelligence 보고서를 프로그래밍 방식으로 다운로드
http://<my_host>:<my_port>/analytics/saw.dll?Go&Action=Download&path=<my_path>&Format=csv
를 입력하면 팝업이 나타납니다 다운로드 나는 파일을 다운로드 할 수 있습니다.
그러나 Java를 사용하여 보고서를 다운로드하려고하면 "사용자의 브라우저가 Oracle BI Presentation Services에서 지원되지 않습니다."라는 html 내용을 다운로드합니다.
그래서URL url = new URL("http://<my_host>:<my_port>/analytics/saw.dll?Go&Action=Download&path=<my_path>&Format=csv");
URLConnection urlc = url.openConnection();
urlc.addRequestProperty("User-Agent", "Mozilla/4.0");
BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));
bos = new BufferedOutputStream(new FileOutputStream("file.csv"), 1024);
bis = new BufferedInputStream(urlc.getInputStream());
byte[] data = new byte[1024];
while ((x = bis.read(data, 0, 1024)) >= 0) {
bos.write(data, 0, x);
}
, 어떻게 보고서를 다운로드 할 수 있습니다 여기에
의 코드 조각은 내가 사용입니까?