无法从 Oracle APEX 创建 Web 服务 [英] Cannot create webservices from Oracle APEX

查看:210
本文介绍了无法从 Oracle APEX 创建 Web 服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 Oracle APEX 的新手,我正在尝试从 Oracle APEX 20.2 创建 REST 数据 Web 服务,同时创建以下 Web 服务是配置设置,

I am new to Oracle APEX, i am trying to create REST Data Webservices from Oracle APEX 20.2, while creating the web services below are the configuration settings,

在此处输入图片说明

在此处输入图片说明

因此,关于这个问题,我正在尝试执行 APEX ACL 脚本,但它显示以下错误,

So regarding this issue i am trying to execute the APEX ACL Script but it's showing an below error,

DECLARE
  ACL_PATH  VARCHAR2(4000);
    ACL_ID    RAW(16);
  BEGIN
    -- Look for the ACL currently assigned to '*' and give APEX_040200
    -- the "connect" privilege if APEX_040200 does not have the privilege yet.

 SELECT ACL INTO ACL_PATH FROM DBA_NETWORK_ACLS
 WHERE HOST = '*' AND LOWER_PORT IS NULL AND UPPER_PORT IS NULL;

  -- Before checking the privilege, ensure that the ACL is valid
  -- (for example, does not contain stale references to dropped users).
  -- If it does, the following exception will be raised:
  --
  -- ORA-44416: Invalid ACL: Unresolved principal 'APEX_040200'
  -- ORA-06512: at "XDB.DBMS_XDBZ", line ...
  --
  SELECT SYS_OP_R2O(extractValue(P.RES, '/Resource/XMLRef')) INTO ACL_ID
  FROM XDB.XDB$ACL A, PATH_VIEW P
  WHERE extractValue(P.RES, '/Resource/XMLRef') = REF(A) AND
     EQUALS_PATH(P.RES, ACL_PATH) = 1;

 DBMS_XDBZ.ValidateACL(ACL_ID);
  IF DBMS_NETWORK_ACL_ADMIN.CHECK_PRIVILEGE(ACL_PATH, 'APEX_040200', 
 'connect') IS NULL THEN 
  DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(ACL_PATH, 
 'APEX_040200', TRUE, 'connect'); 
 END IF;

  EXCEPTION
  -- When no ACL has been assigned to '*'.
   WHEN NO_DATA_FOUND THEN
   DBMS_NETWORK_ACL_ADMIN.CREATE_ACL('power_users.xml',
  'ACL that lets power users to connect to everywhere',
  'APEX_040200', TRUE, 'connect');
   DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL('power_users.xml','*');
 END;
/
 COMMIT;

错误:(我在执行上述脚本时面临)

ERROR: (I am facing while execute the above script)

ORA-06550: line 8, column 33: PL/SQL: ORA-00942: table or view does not exist ORA-06512: at         "SYS.WWV_DBMS_SQL_APEX_200200", line 670 ORA-06550: line 8, column 3: PL/SQL: SQL Statement ignored    ORA-06550: line 24, column 7: PLS-00201: identifier 'DBMS_NETWORK_ACL_ADMIN' must be declared ORA-06550: line 24, column 4: PL/SQL: Statement ignored ORA-06550: line 33, column 3: PLS-00201: identifier 'DBMS_NETWORK_ACL_ADMIN' must be declared ORA-06550: line 33, column 3: PL/SQL: Statement ignored ORA-06550: line 36, column 3: PLS-00201: identifier 'DBMS_NETWORK_ACL_ADMIN' must be declared ORA-06550: line 36, column 3: PL/SQL: Statement ignored ORA-06512: at "SYS.DBMS_SYS_SQL", line 1658 ORA-06512: at "SYS.WWV_DBMS_SQL_APEX_200200", line 656 ORA-06512: at "APEX_200200.WWV_FLOW_DYNAMIC_EXEC", line 1768

所以当我检查 APEX 论坛时,基本上我们需要连接权限来创建 Web 服务,所以我的问题是如何在使用 apex.oracle.com 时获得连接权限,我正在使用 oracle apex 的测试模式,为此我请求谁获得连接权限,谁负责 DBA,或者如何解决这个问题.

So while i am checking APEX Forum basically we need the connect privilege to create web services, so my question is how to get connect privilege while using apex.oracle.com, I am using testing schema for oracle apex, for that to whom i request to get connect privilege, who is responsible DBA for that, or how to fix this issue.

提前致谢,轭

推荐答案

如果你想暴露 Restful 服务,你不需要配置 ACL.从invoke RESTful 服务调用连接到invoke 数据库需要ACL,例如从pl/sql.通常,这些脚本由 DBA 运行,我怀疑您无论如何都没有运行它们的权限.

You don't need to configure ACL if you want to expose restful services. ACL is needed to connect from invoke restful service calls from within the database, eg from pl/sql. Typically those scripts are run by a DBA, I doubt you'd have the permissions to run them anyway.

开始使用 restful 服务的最佳位置是安装示例服务并调查示例模块.您可以在浏览器中使用 GET 处理程序复制模板的 url 并查看结果.从那里开始开发你自己的.顺便说一句,ACL 的脚本有错误的顶点用户.APEX_040200 是顶点 4.2 的顶点架构.那是一个相当旧的版本.apex.oracle.com 有最新版本,目前是 20.2.

The best place to start with restful services is to install the sample service and investigate the sample module. You can just copy the url of a template with a GET handler in your browser and see the results. From there on start developing your own. By the way, that script for ACL has the wrong apex user. APEX_040200 was the apex schema for apex 4.2. That is a rather old version. apex.oracle.com has the latest version which currently is 20.2.

这篇关于无法从 Oracle APEX 创建 Web 服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆