Follow Us on Twitter

APEX webservice references and ACL

by Marcel van der Plas on February 9, 2010 · 4 comments

When you upgrade your APEX installation on an Oracle 11g database, you might get network access problems like not being able to send email or create a web service reference. This is because the ACL (access control list) has not been well configured.

The Oracle 11g database is shipped with APEX 3.01 pre-installed. This APEX installation resides in schema FLOWS_030000. In order to be able to communicate over the Internet, this user gets the connect and the resolve privileges which can be granted with the package dbms_network_acl_admin. After upgrading, the APEX installation will reside in the APEX_030200 schema. This is a new created user and does not yet have the connect and the resolve privileges by default!

To grant connect privileges to a host for the APEX_030200 user, execute the following script:

begin
  dbms_network_acl_admin.create_acl (acl         => 'acl_user.xml'
                                    ,description => 'Description'
                                    ,principal   => 'APEX_030200'
                                    ,is_grant    => true
                                    ,privilege   => 'connect'
                                    ,start_date  => null
                                    ,end_date    => null);
  --
  DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(acl       => 'acl_user.xml'
                                      ,principal => 'APEX_030200'
                                      ,is_grant  => true
                                      ,privilege => 'resolve');
  --
  DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL(acl  => 'acl_user.xml'
                                   ,host => '<name of website or host, i.e. soap.amazon.com>');
  --
  commit;
end;
/

This script must be executed by the SYS or SYSTEM user.

APEX webservice references and ACL, 4.8 out of 5 based on 4 ratings

Ratings:
VN:F [1.9.22_1171]
Rating: 4.8/5 (4 votes cast)

4 comments on “APEX webservice references and ACL

  1. Pingback: Tweets die vermelden APEX webservice references and ACL -- Topsy.com

  2. Pat Miller on said:

    Hi,
    I tried to implement the sample in your Apex 4.0 cookbook for Google Maps and cannot get the map to show. Do you have any errata or any changes to share that could help in getting the example to work? I have tried it on a couple different Apex environments and cannot get the map to show. Any suggestions on diagnosing the problem?

    Pat

    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
  3. This code has not been tested!! How is it possible to post such a piece of code (under the name of a consulting company in IT services) here??
    By the way, in practice, the parameter principal might not have the value as given above… it will be a quite wrong application design.
    The commit should be issued outside of the PL/SQL block ini order to catch through an exception the posible errors or lack of permissions.

    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
    • Hello Larry,

      Thank you for commenting on this post.

      You might not have noticed, this blog was written 4 years ago specifically for a now very old version of APEX in combination with the 11g database.
      I’m guessing you are now running a higher version of APEX. It’s true that for newer version of APEX (and the database) this code will not work.

      I can assure you that the code has been tested and found working perfectly at the time this blog was written.
      Do you mind telling us what you are trying to accomplish? We might be able to offer you another solution for you situation.

      VN:F [1.9.22_1171]
      Rating: 0 (from 0 votes)

Leave a Reply

Your email address will not be published. Required fields are marked *

*

* Copy This Password *

* Type Or Paste Password Here *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

 

Previous post:

Next post:

About Whitehorses
Company profile
Services
Technology

Whitehorses website

Home page
Whitebooks
Jobs

Follow us
Blog post RSS
Comment RSS
Twitter