This discussion is archived
1 2 Previous Next 28 Replies Latest reply: Aug 28, 2012 7:47 AM by user579742 RSS

Why don't I see the DAD I created

user579742 Newbie
Currently Being Moderated
Hi,

I created a DAD as below in a oracle 11gR2 SE on Windows 2008 box,

BEGIN
DBMS_EPG.create_dad (
dad_name => 'xml_demo',
path => '\xml_demo\*');
END;
/

And when I do a http://localhost:8080 on the server itself, I see a page with,
Index of /
Name
---------
home/
public/
sys/

Should I not see the xml_demo at this time?

Appreciate your help.

Thanks,

Sujith
  • 1. Re: Why don't I see the DAD I created
    damorgan Oracle ACE Director
    Currently Being Moderated
    Take a look at the DAD authorization demo on my website:
    http://www.morganslibrary.org/reference/pkgs/dbms_epg.html#epg2

    Modify it and report back what you see?
  • 2. Re: Why don't I see the DAD I created
    MarcoGralike Oracle ACE Director
    Currently Being Moderated
    Check the outcome of
    $ORACLE_HOME/rdbms/admin/epgstat.sql
    and see if anything was even created as expected...

    http://docs.oracle.com/cd/B28359_01/appdev.111/b28424/adfns_web.htm#CHDCAICF
  • 3. Re: Why don't I see the DAD I created
    MarcoGralike Oracle ACE Director
    Currently Being Moderated
    That said doesn't it have to be
    BEGIN
       DBMS_EPG.create_dad (dad_name => 'xml_demo', path => '/xml_demo/*');
    END;
    /
  • 4. Re: Why don't I see the DAD I created
    user579742 Newbie
    Currently Being Moderated
    Here is the output


    --------------------------------------
    | XDB protocol ports: |
    | XDB is listening for the protocol |
    | when the protocol port is non-zero. |
    --------------------------------------

    HTTP Port FTP Port
    --------- --------
    8080 7787

    1 row selected.

    ---------------------------
    | DAD virtual-path mappings |
    ---------------------------

    Virtual Path DAD Name
    -------------------------------- --------------------------------
    \xml_demo\* xml_demo

    1 row selected.

    ----------------
    | DAD attributes |
    ----------------

    no rows selected

    ---------------------------------------------------
    | DAD authorization: |
    | To use static authentication of a user in a DAD, |
    | the DAD must be authorized for the user. |
    ---------------------------------------------------

    DAD Name User Name
    -------------------------------- --------------------------------
    xml_demo WS_USER

    1 row selected.

    ----------------------------
    | DAD authentication schemes |
    ----------------------------

    DAD Name User Name Auth Scheme
    -------------------- -------------------------------- ----------------
    xml_demo Dynamic

    1 row selected.

    --------------------------------------------------------
    | ANONYMOUS user status: |
    | To use static or anonymous authentication in any DAD, |
    | the ANONYMOUS account must be unlocked. |
    --------------------------------------------------------

    Database User Status
    --------------- --------------------
    ANONYMOUS EXPIRED

    1 row selected.

    -------------------------------------------------------------------
    | ANONYMOUS access to XDB repository: |
    | To allow public access to XDB repository without authentication, |
    | ANONYMOUS access to the repository must be allowed. |
    -------------------------------------------------------------------

    Allow repository anonymous access?
    ----------------------------------
    false

    1 row selected.

    SQL>
  • 5. Re: Why don't I see the DAD I created
    user579742 Newbie
    Currently Being Moderated
    Let me drop the DAD and recreate it with /xml_demo/* then.

    Will post the results here.

    Thanks,

    Sujith
  • 6. Re: Why don't I see the DAD I created
    user579742 Newbie
    Currently Being Moderated
    I have created the DAD and here is the output. I still see the same 3 folders as I originally posted.


    --------------------------------------
    | XDB protocol ports: |
    | XDB is listening for the protocol |
    | when the protocol port is non-zero. |
    --------------------------------------

    HTTP Port FTP Port
    --------- --------
    8080 7787

    1 row selected.

    ---------------------------
    | DAD virtual-path mappings |
    ---------------------------

    Virtual Path DAD Name
    -------------------------------- --------------------------------
    /xml_demo/* xml_demo

    1 row selected.

    ----------------
    | DAD attributes |
    ----------------

    DAD Name DAD Param DAD Value
    ------------ ------------------------ ----------------------------------------
    xml_demo database-username WS_USER

    1 row selected.

    ---------------------------------------------------
    | DAD authorization: |
    | To use static authentication of a user in a DAD, |
    | the DAD must be authorized for the user. |
    ---------------------------------------------------

    DAD Name User Name
    -------------------------------- --------------------------------
    xml_demo WS_USER

    1 row selected.

    ----------------------------
    | DAD authentication schemes |
    ----------------------------

    DAD Name User Name Auth Scheme
    -------------------- -------------------------------- ------------------
    xml_demo WS_USER Static

    1 row selected.

    --------------------------------------------------------
    | ANONYMOUS user status: |
    | To use static or anonymous authentication in any DAD, |
    | the ANONYMOUS account must be unlocked. |
    --------------------------------------------------------

    Database User Status
    --------------- --------------------
    ANONYMOUS EXPIRED

    1 row selected.

    -------------------------------------------------------------------
    | ANONYMOUS access to XDB repository: |
    | To allow public access to XDB repository without authentication, |
    | ANONYMOUS access to the repository must be allowed. |
    -------------------------------------------------------------------

    Allow repository anonymous access?
    ----------------------------------
    false

    1 row selected.

    SQL>
  • 7. Re: Why don't I see the DAD I created
    odie_63 Guru
    Currently Being Moderated
    Why should it create a folder ?

    DBMS_EPG.CREATE_DAD creates... a DAD (Database Access Descriptor) and maps a virtual path to it. It doesn't create any folder in the XDB repository.
  • 8. Re: Why don't I see the DAD I created
    user579742 Newbie
    Currently Being Moderated
    When I run the web service using
    http://localhost:8080/xml_demo/get_equip_object, it gives me the HTTP 404
    I have created the procedure get_equip_object while logged in as WS_USER and here is the code,

    note, I have made sure that table equipment_object has data. And also the columns are valid.


    REATE OR REPLACE PROCEDURE get_equip_object(p_mch_code IN equipment_object.mch_code%TYPE DEFAULT NULL) IS
    BEGIN
    OWA_UTIL.mime_header('text/xml');
    HTP.print('xml version="1.0"?>');
    HTP.print('<equip_list>');
    FOR cur_rec IN (SELECT *
    FROM equipment_object
    WHERE mch_code IS NULL
    OR mch_code = p_mch_code) LOOP
    HTP.print('<equip>'
    || '<mch_code>' || cur_rec.mch_code || '</mch_code>'
    || '<mch_name>' || DBMS_XMLGEN.convert(cur_rec.mch_name) || '</mch_name>'
    || '<mch_code_key_value>' || DBMS_XMLGEN.convert(cur_rec.mch_code_key_value) || '</mch_code_key_value>'
    || '</equip>');
    END LOOP;
    HTP.print('</equip_list>');
    EXCEPTION
    WHEN OTHERS THEN
    HTP.print('<ERROR>' || SQLERRM || '</ERROR>');
    END get_equip_object;
    /

    Thanks,

    Sujith

    Edited by: user579742 on Aug 24, 2012 1:39 PM
  • 9. Re: Why don't I see the DAD I created
    odie_63 Guru
    Currently Being Moderated
    Basic question but, did you commit after your calls to DBMS_EPG?
  • 10. Re: Why don't I see the DAD I created
    user579742 Newbie
    Currently Being Moderated
    Yes I did commit.
    Thanks,
    Sujith
  • 11. Re: Why don't I see the DAD I created
    user579742 Newbie
    Currently Being Moderated
    I opened up the ANONYMOUS user account by unlocking it and giving it a password.
    Still when I try to run the web service, http://localhost:8080/xml_demo/get_equip_object, it gives me the HTTP 404 page.

    Has any of you done this in Windows and if so, could you share the steps to get there?

    Thanks,

    Sujith
  • 12. Re: Why don't I see the DAD I created
    MarcoGralike Oracle ACE Director
    Currently Being Moderated
    Basic question, did you enable HTTP access via the (Protocol) Listener?

    http://www.liberidu.com/blog/2006/12/18/apex-installation-via-the-oracle-protocol-server-listener/

    http://ora-00001.blogspot.nl/2009/07/creating-rest-web-service-with-plsql.html

    Edited by: Marco Gralike on Aug 27, 2012 4:23 PM
  • 13. Re: Why don't I see the DAD I created
    user579742 Newbie
    Currently Being Moderated
    I had seen the port 8080 is listed in listener status last week, but today after a couple of db restarts, I don't see that the listener is listning on port 8080.

    Only thing I did this morning is to add the port 8080 in inbound rules in the server, to make sure that's not blocked by the firewall.

    How can I add the port 8080 to the listener so it starts listning for port 8080?

    DB parameter dispatchers has a value of (PROTOCOL=TCP)(SERVICE=DBNAMEXDB)

    Thanks,

    Sujith
  • 14. Re: Why don't I see the DAD I created
    MarcoGralike Oracle ACE Director
    Currently Being Moderated
    See blog post about apex install, if it still doesnt work, give output from LSNRCTL STATUS
1 2 Previous Next

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points