为什么我的 Oracle Rest-Enabled SQL 参考未被识别?
和这个人吵了好几天了。希望我太厚重了,某处漏掉了一个分号。
我一直在尝试在本地机器上设置对启用 REST 的 SQL (RESS) 的引用,但 Apex 拒绝承认。
我正在使用 https://docs.oracle.com/database/apex-18.1/HTMDB/rest-enabled-sql-creating.htm#HTMDB-GUID-0906921E-AF79-49D4-B909-1C090F805D9D,其中看起来很简单。
在您询问之前:
- 是的,我已经启用了 REST 架构
- 是的,我已经在 defaults.xml 文件中启用了 RESS
- 是的,我已经使用像
curl -i -X POST --user testuser1:testuser1 --data-binary "select sysdate来自 Dual" -H "Content-Type: application/sql" -k http://localhost:8080/ords/hr2/_/sql
,它可以工作。
然后在 APEX->共享组件->数据源->REST Enabled SQL 中,我设置了此参考:
并且它使用这些凭据:
但是,当我最初创建引用并对其进行测试时,我收到以下消息:
我到底做错了什么? 使用 Oracle APEX 21.2.0 和 ORDS 版本 21.4.1.r0250904
Been fighting with this one for days. Hopefully, I'm being thick and there's a semicolon missing from somewhere.
I've been trying to setup a reference to my REST-enabled SQL (RESS) on my local box, and Apex refuses to acknowledge it.
I'm using the article at https://docs.oracle.com/database/apex-18.1/HTMDB/rest-enabled-sql-creating.htm#HTMDB-GUID-0906921E-AF79-49D4-B909-1C090F805D9D, which seems quite straightforward.
Before you ask:
- Yes, I've enabled the schema for REST
- Yes, I've enabled RESS in the defaults.xml file
- Yes, I've tested the RESS away from APEX, using a curl command like
curl -i -X POST --user testuser1:testuser1 --data-binary "select sysdate from dual" -H "Content-Type: application/sql" -k http://localhost:8080/ords/hr2/_/sql
, and it works.
Then in APEX->Shared Components->Data Sources->REST Enabled SQL, I've setup this reference:
and it uses these credentials:
However, when I initially created the reference, and when I test it, I get the following message:
What on earth am I doing wrong?
Using Oracle APEX 21.2.0 and ORDS Version 21.4.1.r0250904
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
屏幕截图看起来不错。我现在将检查数据库是否可以通过 APEX_WEB_SERVICE 到达 ORDS 端点,如下所示(您可以使用 SQL*Plus 或 SQL Workshop 来实现此目的):
可能的错误是...
the screen shots look good. I would now check whether the database can reach the ORDS endpoint with APEX_WEB_SERVICE, as follows (you can use either SQL*Plus or SQL Workshop for this):
Possible errors are ...