0

我正在使用 Oracle 11g XE,我在其上安装了最新版本的 APEX (5),现在我正在尝试使用 restful 服务选项通过 rest 公开我的表。我已经下载了 ORDS 并按照此处的说明独立安装和运行它。我在 apex 中创建了一个休息服务,但我不知道如何测试它 - 我尝试了各种 URL,但没有得到任何响应!

我的 apex 安装为http://localhost:8080/apex/

在启动时 ORDS 似乎暗示它映射到 /ords 但情况似乎并非如此。

如果我导航到http://localhost:8080/ords我会得到一个 Authentication required 弹出窗口 - 需要用户名和密码。服务器说 XDB。

我还使用 uri 模板 emp_json 创建了一个基于 EMP 的 restful 服务。我希望这将在http://localhost:8080/ords/emp_json(或者可能是http://localhost:8080/apex/emp_json)上提供服务,但我再次只得到验证所需的弹出窗口。我在这里尝试了各种数据库用户的密码,例如 APEX_REST_PUBLIC_USER 但我只是得到一个未找到的响应。

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
4

2 回答 2

0

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
于 2018-02-10T04:24:19.050 回答
0

这是一个迟到的答案,但仍然......

尝试直接导航到默认登录页面:

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

取决于你如何部署它。

关于 REST:

http://localhost:8080/apex/emp_json 在 SQL 开发人员中,您必须指定不进行身份验证,是吗?

请记住,在 APEX 安装中还有一个额外的步骤来启用 REST 功能。

于 2015-11-01T13:26:14.950 回答