This discussion is archived
2 Replies Latest reply: Nov 13, 2012 11:50 AM by 827910 RSS

Apex 4.1 restful services give HTTP 404 if cookie is not sent along

827910 Newbie
Currently Being Moderated
When I call a classic report that is exported throuh restful webservice, result depends on whether I also send cookie or not. In the first case, access is enabled, in the latter case, HTTP 404 is returned.

Restful access is enabled in the instance. Having an app with ID=101, page 9901 that is public, a classic report called MYREPORT on the restful side, the following call is issued:

/apex/apex_rest.getReport?app=101&page=9901&reportid=MYREPORT_ID&parmvalues=123445&output=json


If my browser send the cookie below with the request, I get back the result. If I delete the cookie from my browser, the result for the exact same apex_rest call is HTTP 404: Not found.

Cookie: ORA_WWV_USER_64731425336707=04893186A373057F5F1E1FCCD33113FA; PUBLIC_ORA_WWV_USER_64731425336707=-1; ORA_WWV_REMEMBER_UN=MYNAME:myworkspace


Details on my configuration is as follows:
Database: Oracle XE 11g, 11.2.0.2.0
Apex version: 4.1.1.00.23_en
Platform: Linux x64
HTTP is handles by XEXDB as folows from lsnrctl status:
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=kivi.omikk.bme.hu)(PORT=8080))(Presentation=HTTP)(Session=RAW))

Service "XEXDB" has 1 instance(s).
Instance "XE", status READY, has 1 handler(s) for this service...


Do I do something in the wrong way? I would appreciate any clue as well as comments stating if particular configurations does not suffer from this issue.

Thank you,
Jozsef
  • 1. Re: Apex 4.1 restful services give HTTP 404 if cookie is not sent along
    jstraub Journeyer
    Currently Being Moderated
    Joszef:

    I attempted to reproduce the issue you describe but I could not. On a 4.1.1.00.23 instance, I enabled a report for RESTful access on a public page. In a new tab in the same browser, I invoked that report like:

    http://myhost:8080/apex/apex_rest.getReport?app=372&page=1&reportid=emps&output=json

    That invocation worked. To attempt to reproduce your scenario, I connected to a remote machine using VNC, started firefox and pasted the same URL from above. The result was a JSON document not a 404.

    This feature should not rely on a cookie being set whatsoever. I cannot think of a reason you are experiencing the issue you describe.

    Regards,

    Jason
  • 2. Re: Apex 4.1 restful services give HTTP 404 if cookie is not sent along
    827910 Newbie
    Currently Being Moderated
    Thank you, Jason.

    I agree that it should not have anything to do with cookies, but yesterday it seemed so. Today I revisited this problem on my system and it seems much more weird than yesterday.

    Actually, I have 2 classic reports on my page enabled for RESTful access.

    The first one returns a JSON document regardless that I fetch it from browser or using the command line utility wget from the same host.

    The second one returns a JSON document when fetched from browser, anf gives 404 when I fetch using wget.


    Is there a way to trace what is going on inside XEXDB?

    Thank you,
    Jozsef

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points