This discussion is archived
12 Replies Latest reply: Aug 22, 2013 5:24 AM by 8d4b01bf-3d32-47c4-a892-8975f524d7a3 RSS

xml webservices configuration problem

8d4b01bf-3d32-47c4-a892-8975f524d7a3 Newbie
Currently Being Moderated

WHILE EXECUTING

set long 500

set pagesize 100

XQUERY declare default element namespace "http://xmlns.oracle.com/xdb/xdbconfig.xsd";

for $doc in fn:doc("/xdbconfig.xml")/xdbconfig/sysconfig/protocolconfig/httpconfig/webappconfig/servletconfig/servlet-list/servlet[servlet-name='orawsv']

return $doc

 

I GOT AN ERROR

 

Error starting at line 3 in command:

select column_value from xmltable(' declare default element namespace "http://xmlns.oracle.com/xdb/xdbconfig.xsd";

for $doc in fn:doc("/xdbconfig.xml")/xdbconfig/sysconfig/protocolconfig/httpconfig/webappconfig/servletconfig/servlet-list/servlet[servlet-name='orawsv']

return $doc')

Error at Command Line:4 Column:146

Error report:

SQL Error: ORA-02000: missing COLUMNS keyword

02000. 00000 -  "missing %s keyword"

 

Please help ,i needed to xml db configuration

  • 1. Re: hI
    odie_63 Guru
    Currently Being Moderated

    Please give exact versions of :

    - your database

    - SQL*Plus

  • 2. Re: hI
    8d4b01bf-3d32-47c4-a892-8975f524d7a3 Newbie
    Currently Being Moderated

    Its 10 g but i also have to configure this on 11g

  • 3. Re: hI
    8d4b01bf-3d32-47c4-a892-8975f524d7a3 Newbie
    Currently Being Moderated

    This is where i have to do the testing and configure

     

    Oracle Database 11g Express Edition Release 11.2.0.2.0 - Production

    PL/SQL Release 11.2.0.2.0 - Production

    "CORE 11.2.0.2.0 Production"

    TNS for 32-bit Windows: Version 11.2.0.2.0 - Production

    NLSRTL Version 11.2.0.2.0 - Production

  • 4. Re: hI
    8d4b01bf-3d32-47c4-a892-8975f524d7a3 Newbie
    Currently Being Moderated

    Does anybody have any idea for this?

  • 5. Re: hI
    odie_63 Guru
    Currently Being Moderated

    I asked about your SQL*Plus version too. Could you check that?

     

    The following works for me on the same db version :

    SQL*Plus: Release 11.2.0.2.0 Production on Wed Aug 14 13:27:59 2013

     

    Copyright (c) 1982, 2010, Oracle.  All rights reserved.

     

     

    Connected to:

    Oracle Database 11g Express Edition Release 11.2.0.2.0 - Production

     

    SQL> set long 500

    SQL> set pagesize 100

    SQL>  XQUERY declare default element namespace "http://xmlns.oracle.com/xdb/xdbconfig.xsd";

      2  for $doc in fn:doc("/xdbconfig.xml")/xdbconfig/sysconfig/protocolconfig/httpconfig/webappconfig/servletconfig/servlet-list/servlet[servlet-name='orawsv']

      3  return $doc

      4  /

     

    Result Sequence

    --------------------------------------------------------------------------------

    <servlet xmlns="http://xmlns.oracle.com/xdb/xdbconfig.xsd">

      <servlet-name>orawsv</servlet-name>

      <servlet-language>C</servlet-language>

      <display-name>Oracle Query Web Service</display-name>

      <description>Servlet for issuing queries as a Web Service</description>

      <servlet-schema>XDB</servlet-schema>

      <security-role-ref>

        <description/>

        <role-name>XDB_WEBSERVICES</role-name>

        <role-link>XDB_WEBSERVICES</role-link>

      </security-role-ref>

    </servlet>

  • 6. Re: hI
    8d4b01bf-3d32-47c4-a892-8975f524d7a3 Newbie
    Currently Being Moderated

    Hi Odie

     

    Thanks for the reply.

    Still i am getting the same error as i asked for when i am trying to run the same script in sql developer.

    Also do i need java installed in the system,though XML DB REPOSITORY is shown in my sql developer.

    Please respond

    Thanks

  • 7. Re: hI
    odie_63 Guru
    Currently Being Moderated

    Still i am getting the same error as i asked for when i am trying to run the same script in sql developer.

    Ok, you're using SQL Developer.

     

    Replace the single quotes with double quotes here :

    servlet-name="orawsv"

     

    It should now run without error, but you'll end up with this :

    COLUMN_VALUE

    ----------------------

    (XMLTYPE)

    which is not very useful.

    So you'd better use XMLTable in the first place :

    SELECT xmlserialize(content column_value)

    FROM XMLTable(

           xmlnamespaces(default 'http://xmlns.oracle.com/xdb/xdbconfig.xsd'),

          'for $doc in fn:doc("/xdbconfig.xml")/xdbconfig/sysconfig/protocolconfig/httpconfig/webappconfig/servletconfig/servlet-list/servlet[servlet-name="orawsv"]

          return $doc'

    ) ;

  • 8. Re: hI
    8d4b01bf-3d32-47c4-a892-8975f524d7a3 Newbie
    Currently Being Moderated

    Hi Odie

     

    while running the same script before verifying i.e adding of servlet,my servlet is not showing in url

     

    DECLARE

      SERVLET_NAME VARCHAR2(32) := 'orawsv';

    BEGIN

      DBMS_XDB.deleteServletMapping(SERVLET_NAME);

      DBMS_XDB.deleteServlet(SERVLET_NAME);

      DBMS_XDB.addServlet(NAME => SERVLET_NAME,

                                  LANGUAGE => 'C',

                                  DISPNAME => 'Oracle Query Web Service',

                                  DESCRIPT => 'Servlet for issuing queries as a Web

    Service',

                                  SCHEMA => 'XDB');

      DBMS_XDB.addServletSecRole(SERVNAME => SERVLET_NAME,

                                 ROLENAME => 'XDB_WEBSERVICES',

                                 ROLELINK => 'XDB_WEBSERVICES');

      DBMS_XDB.addServletMapping(PATTERN => '/orawsv/*',NAME => SERVLET_NAME);

    END;

     

    it always showing me could not connect,i wanted to see XML

     

    Any suggestion??

  • 9. Re: hI
    8d4b01bf-3d32-47c4-a892-8975f524d7a3 Newbie
    Currently Being Moderated

    showed me this..

     

    Oops! Google Chrome could not connect to 127.0.0.1:8080

     

    when i ran the code

     

    connect / AS sysdba


    SELECT dbms_xdb.gethttpport FROM dual;

     

    EXEC dbms_xdb.sethttpport(8080);

     

     

    ALTER system SET dispatchers='(PROTOCOL=TCP)(SERVICE=$ORACLE_SIDXDB)' comment='Dispatcher enabled for XMLDB Protocol Server' scope = BOTH;

     

    ALTER system SET shared_servers=5 scope=BOTH;

     

    ALTER system register;

     

    grant dba, xdbadmin to test;

     

    alter user test identified by test account unlock;

    set echo off

    set termout on

    set feed off

    show user

     

    --Enable the orawsv entry points in xdbconfig.xml

    DECLARE

      SERVLET_NAME VARCHAR2(32) := 'orawsv';

    BEGIN

    DBMS_XDB.deleteServletMapping(SERVLET_NAME);

    DBMS_XDB.deleteServlet(SERVLET_NAME);

    DBMS_XDB.addServlet(NAME => SERVLET_NAME,

    LANGUAGE => 'C',

    DISPNAME => 'Oracle Query Web Service',

    DESCRIPT => 'Servlet for issuing queries as a Web

    Service',

    SCHEMA => 'XDB');

    DBMS_XDB.addServletSecRole(SERVNAME => SERVLET_NAME,

    ROLENAME => 'XDB_WEBSERVICES',

    ROLELINK => 'XDB_WEBSERVICES');

    DBMS_XDB.addServletMapping(PATTERN => '/orawsv/*',NAME => SERVLET_NAME);

    END;

     

    commit;

    -- User Name declare USERNAME=SCOTT -- User Password  declare PASSWORD=tiger

    -- DBMS_NETWORK_ACL_ADMIN to Validate Grant Permission

     

    begin

    dbms_network_acl_admin.drop_acl('/localhost.xml');

      end;

       

      begin

     

    dbms_network_acl_admin.create_acl('/localhost.xml', 'ACL for 127.0.0.1',

    '&USERNAME', true, 'connect');

    dbms_network_acl_admin.assign_acl('/localhost.xml', '127.0.0.1'); end;

     

     

     

    and typed in url

    as

    127.0.01:8080/orawsv?wsdl


  • 11. Re: hI
    8d4b01bf-3d32-47c4-a892-8975f524d7a3 Newbie
    Currently Being Moderated

    Hi Odie

     

    I have tried this all,still the error is:

    <OracleErrors xmlns="http://xmlns.oracle.com/orawsv/faults">  Incorrect Input Doc/URL  </OracleErrors

    why so??

     

  • 12. Re: hI
    8d4b01bf-3d32-47c4-a892-8975f524d7a3 Newbie
    Currently Being Moderated

    I am trying to configure soap and restful web services for synchronous and asynchronous in oracle 11g without the help of java or any other client but unable to do so.

    I Tried to add servlet with in oracle with the help of oracle inbuilt packages for soap webservices but ended with error.

    and about restful services ,just clueless that how can even I configure this.


Legend

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