Categories
- All Categories
- 15 Oracle Analytics Sharing Center
- 16 Oracle Analytics Lounge
- 216 Oracle Analytics News
- 43 Oracle Analytics Videos
- 15.7K Oracle Analytics Forums
- 6.1K Oracle Analytics Idea Labs
- Oracle Analytics User Groups
- 79 Oracle Analytics Trainings
- 15 Oracle Analytics Data Visualizations Challenge
- Find Partners
- For Partners
OBIEE Go Url using HTTP Client Java

Hello Team,
I am developing a JAVA application which will fetch and save OBIEE dashboards as PDF with some parameters in local file system. I understand that it is achievable using GO URL
Example:
However, unfortunately, I am unable to create HTTP client to display PDF results. GET or POST request s are displaying response as HTML with content of signing in in page.
If I use the same URL in the browser then it works fine and display PDF report. I observed that when I copy past this URL in browser and press enter then the request header sends below cookies a part of request
ORA_BIPS_LBINFO=15aa813ce2f;
ORA_BIPS_NQID=ftlv6jn555550h7l1jv4sbhhhhhh2d2710d0qc5epunh9pi8b7jkb;
I am clue less from where request is getting these cookies? I am sending credentials a part of request.
Please help to provide a sample code to implement this requirement.
Thanks
Answers
-
What's the full request headers your java client send?
I guess you are missing some and that's why you end up on the login page, so post all the headers of your request and let's see what you are missing
PS: do you agree your client can follow redirect and send back the cookies it received, right?
0 -
Thanks Gianni.
I am using below headers:
POST /analytics/saw.dll?Dashboard HTTP/1.1
Host: aaaa:yyyy
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:42.0) Gecko/20100101 Firefox/42.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-GB,en;q=0.5
Accept-Encoding: gzip, deflate
Referer:
And redirecting using code:
HttpClient client = HttpClientBuilder.create()
.setRedirectStrategy(new LaxRedirectStrategy()).build();
0 -
Hi,
Not sure you are the same person or just 2 different having the same exact question and code
Actually the answer is correct, it's HTML!
You can keep it as a GET request, that's what the system expect, and if you do it in your browser what do you observe?
You first see a spinning "login" image and then, depending on how fast your login is, you have the PDF on your screen.
I was maybe just lucky enough to test on a really busy server so the login took 30 seconds and I could clearly see the code.
Look at this piece of code:
<script type="text/javascript">window.onload=function(){ onLoggingInPageLoad('saw.dll?Dashboard', {"Page":"Standard Visuals","Action":"Print","PortalPath":"/shared/02. Visualizations/_portal/2.10 Vanilla and Configured Visuals","caj_token":"J-u1pMiNUIA","Format":"pdf"} );};</script>
It's included in the HTML code you get back.
So it's a piece of javascript doing a redirect or something like that once the session is open, so after using your NQUser and NQPassword to authenticate you.
No idea if your JAVA can actually understand and execute javascript to simulate the browser behaviour, but I will say an easiest solution is the following:
1) you call your actual link (or even just the OBIEE homepage link) passing NQUser and NQPassword
2) you take all the cookies you get back and keep them
3) you call the real link with action=print and format=pdf but without NQUser and NQPassword sending all the cookies of point 2
4) you get your PDF directly back, nothing else in between
In other words: first you have to open a valid session, that's what NQUser and NQPassword will always do (so even if a session already exists these 2 params will do a login again), then you call the real link you need.
Done! Works just fine
If you got what you were looking for you can maybe close the thread and mark as required to help other users of the forum with similar questions finding something that can help them.
0 -
Thanks Gianni. Let me try as you suggested.
0