0
votes

I'm using Oracle 11g XE, I installed the latest version of APEX (5) on it and now I'm trying to use the restful services options to expose my tables via rest. I've downloaded ORDS and followed the instructions here to install and run it as standalone. I create a rest service in apex but I don't know how to test it - I've tried various URLS and not got any response!

My apex is installed as http://localhost:8080/apex/

On startup ORDS appears to suggest that it maps to /ords but this doesn't appear to be the case.

If I navigate to http://localhost:8080/ords I get an Authentication required popup - requires a username and password. The server says XDB.

I've also created a restful service based on EMP with uri template emp_json. I expected this to be served at http://localhost:8080/ords/emp_json (or maybe http://localhost:8080/apex/emp_json) but again I only get the authentication required popup. I've tried the password for various db users here e.g. APEX_REST_PUBLIC_USER but I just get a not found response.

2015-08-06 11:24:29.520:INFO::main: Logging initialized @764ms
Aug 06, 2015 11:24:29 AM oracle.dbtools.standalone.StandaloneJetty setupDocRoot
INFO: The document root is serving static resources located in: E:\software\ords\ords\standalone\doc_root
2015-08-06 11:24:29.972:INFO:oejs.Server:main: jetty-9.2.z-SNAPSHOT
2015-08-06 11:24:29.972:INFO:oejsh.ContextHandler:main: Started o.e.j.s.h.ContextHandler@83f700d{/,null,AVAILABLE}
2015-08-06 11:24:30.019:INFO:/ords:main: INFO: Using configuration folder: E:\software\ords\ords
2015-08-06 11:24:30.019:INFO:/ords:main: FINEST: |ApplicationContext [configurationFolder=E:\software\ords\ords, services=Application Scope]|
Aug 06, 2015 11:24:30 AM oracle.dbtools.common.config.db.DatabasePools validatePool
INFO: Validating pool: apex
Aug 06, 2015 11:24:30 AM oracle.dbtools.common.config.db.DatabasePools validatePool
INFO: Pool: apex is correctly configured
Aug 06, 2015 11:24:30 AM oracle.dbtools.common.config.db.DatabasePools validatePool
INFO: Validating pool: apex_al
Aug 06, 2015 11:24:30 AM oracle.dbtools.common.config.db.DatabasePools validatePool
INFO: Pool: apex_al is correctly configured
Aug 06, 2015 11:24:30 AM oracle.dbtools.common.config.db.DatabasePools validatePool
INFO: Validating pool: apex_pu
Aug 06, 2015 11:24:30 AM oracle.dbtools.common.config.db.DatabasePools validatePool
INFO: Pool: apex_pu is correctly configured
Aug 06, 2015 11:24:30 AM oracle.dbtools.common.config.db.DatabasePools validatePool
INFO: Validating pool: apex_rt
Aug 06, 2015 11:24:30 AM oracle.dbtools.common.config.db.DatabasePools validatePool
INFO: Pool: apex_rt is correctly configured
2015-08-06 11:24:30.582:INFO:/ords:main: INFO: Oracle REST Data Services initialized|Oracle REST Data Services version : 3.0.1.177.18.02|Oracle REST Data Services server info: jetty/9.2.z-SNAPSHOT|
2015-08-06 11:24:30.597:INFO:oejsh.ContextHandler:main: Started o.e.j.s.ServletContextHandler@1f0f2a1a{/ords,null,AVAILABLE}
2015-08-06 11:24:30.613:INFO:oejs.ServerConnector:main: Started ServerConnector@5c702c89{HTTP/1.1}{0.0.0.0:8080}
2015-08-06 11:24:30.613:INFO:oejs.Server:main: Started @1857ms
2

2 Answers

0
votes

It is a late answer but still...

Try to navigate directly to the default login page:

http://localhost:8080/apex/f?p=4550 or http://localhost:8080/ords/f?p=4550

depending on how you deployed it.

Regarding REST:

http://localhost:8080/apex/emp_json In SQL developer you have to specify no authentication, have you?

Remember that there was an additional step in the APEX installation to enable REST capabilities.

0
votes

The database has a default webserver for XDB that is on port 8080.

If I navigate to http://localhost:8080/ords I get an Authentication required popup - requires a username and password. The server says XDB.

Change that port with this

SQL> -- set http port
SQL> begin
 2    dbms_xdb.sethttpport('9090');
 3  end;
 4  /

OR change the port for ORDS by editing E:\software\ords\ords\standalone\standalone.properties

#Tue Feb 06 12:26:12 EST 2018
jetty.port=9090                 <<<<<<<<<<< CHANGE THIS >>>>>>>>>>
standalone.access.log=/tmp/ordsLOGS
standalone.context.path=/ords
standalone.doc.root=/Users/klrice/workspace/githubTools/trunk/ords/
standalone.scheme.do.not.prompt=true
standalone.static.context.path=/i
standalone.static.path=/Users/klrice/workspace/apex_trunk/images