XML parsing failed while select from my table with criteria

While select from my table an error displayed as
ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00601: Invalid token in: '/<XML Path>/row[c24="SA0010001"]'
select * from category
where existsNode(xmlrecord, '/<XML Path>/row[c24="SA0010001"]') = 1;
xmlrecord
<row id="52843" xml:space="preserve">
<c1>Refund of Domestic Payment Order</c1>
<c2>Ref Dom Py Or</c2>
<c3>PLsql</c3>
<c20>1</c20>
<c21>62_TAABSINPUTT___OFS_TAABS</c21>
<c22>0803181605</c22>
<c23>62_TAABSINPUTT_OFS_TAABS</c23>
<c24>SA0010001</c24>
<c25>1</c25>
</row>

Hi,
Did you copy that sample from some demo?
The part "<XML Path>" is meant to be replaced by a real XPath fragment.
Here, I think you may just want this :
select * from category
where existsNode(xmlrecord, '/row[c24="SA0010001"]') = 1;Edit : OK, just seen your previous post and the example given
Edited by: odie_63 on 6 juil. 2010 21:16

Similar Messages

  • Xml parsing error while selecting whole result set for sql query

    Hi All,
    I am having xml parsing error while selecting whole query result set. The data is coming fine for default result set of 50 rows.
    My exception is below.
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00234: namespace prefix "xsi" is not declared
    Error at line 1
    ORA-06512: at "SYS.XMLTYPE", line 254
    ORA-06512: at line 1
    *31011. 00000 - "XML parsing failed"*
    **Cause: XML parser returned an error while trying to parse the document.*
    **Action: Check if the document to be parsed is valid.*
    My sql query is below that is giving results for default result set of 50 rows.
    select extract(xmlType(clob_xml_colm_name), '//v2:node1//childnode/text()','xmlns:v2="namespace_url"').getStringVal()  from table_name
    My sql developer version is below.
    Java(TM) Platform     1.7.0_04
    Oracle IDE     3.1.07.42
    Versioning Support     3.1.07.42
    My database version is below.
    Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit
    Please could any one help me urgently as the sql query is supposed to be correct as it is returning query results, but the problem happening when i try to select whole result set.
    Thanks and regards,

    What does the XML look like? It appears that some of the supposed XML stored as a CLOB is not really valid XML. Find the row in the table that is causing your issue and review the "XML" in it.

  • KUP-04063: unable to open log file.. (while selecting from External table)

    Hi
    I am trying to craete an external table and then select the data from the table. However I am getting error while trying to select the data from external table.
    SQL>CREATE OR REPLACE DIRECTORY my_dir as 'C:\arun';
    Directory created.
    SQL>GRANT ALL ON DIRECTORY my_dir TO PUBLIC;
    Grant succeeded.
    SQL>DROP TABLE proj_checklists_external;
    Table dropped.
    SQL>CREATE TABLE proj_checklists_external
    2 ( checklist_submission_id NUMBER
    3 ,Lead_reviewer_name VARCHAR2(30)
    4 ,Lead_reviewer_corp_id VARCHAR2(10)
    5 ,creation_date VARCHAR2(10)
    6 ,submitted_dater VARCHAR2(10)
    7 ,approved_date VARCHAR2(10)
    8 ,status VARCHAR2(50)
    9 )
    10 ORGANIZATION EXTERNAL
    11 (
    12 TYPE ORACLE_LOADER
    13 DEFAULT DIRECTORY my_dir
    14 ACCESS PARAMETERS
    15 (
    16 RECORDS DELIMITED BY NEWLINE
    17 FIELDS TERMINATED BY ','
    18 )
    19 LOCATION ('Book1.txt')
    20 )
    21 PARALLEL 5
    22 REJECT LIMIT 200;
    Table created.
    SQL>SELECT * FROM proj_checklists_external;
    SELECT * FROM proj_checklists_external
    ERROR at line 1:
    ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-04063: unable to open log file PROJ_CHECKLISTS_EXTERNAL_28484.log
    OS error No such file or directory
    ORA-06512: at "SYS.ORACLE_LOADER", line 14
    ORA-06512: at line 1
    I craeted an file PROJ_CHECKLISTS_EXTERNAL_28484.log also in C:\arun and then tried to select but still got same error.
    Any idea how to overcome this error.
    Regards
    Arun

    here you go:
    SQL> CREATE OR REPLACE DIRECTORY GRATIS_LOAD as 'D:\AdvSourceData\Membership\';
    Directory created
    SQL> GRANT ALL ON DIRECTORY GRATIS_LOAD to ADVROLE;
    Grant succeeded
    SQL>
    SQL> DROP TABLE MEMB_BATCH_LOAD_ID;
    Table dropped
    SQL> CREATE TABLE MEMB_BATCH_LOAD_ID (
    2 ID_NUMBER VARCHAR2(10),
    3 STATUS CHAR(1)
    4 )
    5 ORGANIZATION EXTERNAL
    6 ( TYPE ORACLE_LOADER
    7 DEFAULT DIRECTORY GRATIS_LOAD
    8 ACCESS PARAMETERS
    9 ( records delimited by NEWLINE
    10 fields (
    11 ID_NUMBER POSITION (1:10) CHAR,
    12 STATUS POSITION (11:1) CHAR
    13 )
    14 )
    15 LOCATION
    16 ( 'GRATISID.TXT'
    17 )
    18 );
    Table created
    SQL> select * from memb_batch_load_id;
    select * from memb_batch_load_id
    ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-04063: unable to open log file MEMB_BATCH_LOAD_ID_1388_5552.log
    OS error The system cannot find the file specified.
    ORA-06512: at "SYS.ORACLE_LOADER", line 14
    ORA-06512: at line 1
    SQL>

  • Dulpicate entry occur while select from edidc table

    HI ,
    internal table I_edidc declare as unique key DOC_NUM while select the value from the edidc table on basis of status ,msgtyp,direct ,sndprt.sndprn ,updat, updtim,cretim,credat giving the duplicate entry dump some time .ANY suggestion

    Hi Prakash ,
    thanks for your replying internal table is refreshed i checked it during the debugging time and this issue not occurs frequently .I think the reason is when the idoc status changes from 51 to 53 it is picking up 51 entry and the same time it status changes to 53 it again tries to pick the same idoc with status 53 .Please correct me if i am wrong and please give your valuable suggestion .Below is the code
    SELECT docnum status direct rcvpor rcvprt rcvprn mescod mesfct sndpor
                     sndprt sndprn credat cretim mestyp idoctp cimtyp upddat updtim
                     FROM edidc INTO TABLE i_edidc
                          WHERE status IN s_status
                          AND   mestyp EQ g_msgtyp
                          AND   direct EQ l_direct
                          AND   sndprt IN s_sndprt
                          AND   sndprn IN s_sndprn
                          AND   credat IN s_credat
                          AND   cretim IN s_cretim
                          AND   upddat IN s_upddat
                          AND   updtim IN s_updtim.

  • Error while selecting  from nested table in PL/SQL block ............

    SQL> create type string_table is table of varchar(100);
    2 /
    Type created.
    declare
    v_names string_table := string_table();
    begin
    v_names.EXTEND(3);
    v_names(1) := 'name1';
    v_names(2) := 'name2';
    v_names(3) := 'name3';
    dbms_output.put_line(v_names(1));
    dbms_output.put_line(v_names(2));
    dbms_output.put_line(v_names(3));
    dbms_output.put_line(v_names.COUNT());
    select * from table(v_names);
    end;
    select * from table(v_names);
    ERROR at line 12:
    ORA-06550: line 12, column 7:
    PLS-00428: an INTO clause is expected in this SELECT statement

    select * from table(v_names);
    I guess ,here you were trying to put the content of the NT into another NT, or just trying to print it.
    But, I don't think INTO Clause is mandatory here.
    Please check your modified code (w/o INTO) and the output :
    DECLARE
       TYPE string_table IS TABLE OF VARCHAR (100);
       v_names   string_table := string_table ();
       v_test    string_table := string_table ();
    BEGIN
       v_names.EXTEND (3);
       v_names (1) := 'name1';
       v_names (2) := 'name2';
       v_names (3) := 'name3';
       DBMS_OUTPUT.put_line ('Old collection - '||v_names (1));
       DBMS_OUTPUT.put_line ('Old collection - '||v_names (2));
       DBMS_OUTPUT.put_line ('Old collection - '||v_names (3));
       DBMS_OUTPUT.put_line ('Old collection - '||v_names.COUNT ());
       DBMS_OUTPUT.put_line (CHR(10));
       /* SELECT * FROM TABLE (v_names); */
       v_test := v_names;
       DBMS_OUTPUT.put_line ('New collection -- '||v_test (1));
       DBMS_OUTPUT.put_line ('New collection -- '||v_test (2));
       DBMS_OUTPUT.put_line ('New collection -- '||v_test (3));
       DBMS_OUTPUT.put_line ('New collection -- '||v_test.COUNT ());
       DBMS_OUTPUT.put_line (CHR(10));
       /* Printing using FOR LOOP */
       FOR i IN v_test.FIRST..v_test.LAST
       LOOP
         DBMS_OUTPUT.put_line ('In FOR Loop --- '||v_test (i));
       END LOOP;
    EXCEPTION
       WHEN OTHERS
       THEN
          DBMS_OUTPUT.put_line ('Error ' ||SQLERRM|| DBMS_UTILITY.format_error_backtrace);
    END;gives o/p :
    Old collection - name1
    Old collection - name2
    Old collection - name3
    Old collection - 3
    New collection -- name1
    New collection -- name2
    New collection -- name3
    New collection -- 3
    In FOR Loop --- name1
    In FOR Loop --- name2
    In FOR Loop --- name3Refer this link -- http://docs.oracle.com/cd/E11882_01/appdev.112/e17126/tuning.htm#CIHGGBGF
    Edited by: ranit B on Dec 26, 2012 2:29 PM
    -- code modified
    Edited by: ranit B on Dec 26, 2012 2:45 PM
    -- code 'again' updated -- FOR LOOP added

  • Select from DB Tables with String

    Hello Gurus,
    I created following 'simple' DDIC Table:
    CLNT     MANDT     CLNT     3     0     Client
    ID        ID     NUMC     8     0     Object ID of Business Event Offered
    DATE   DATUM     DATS     8     0     Date
    STR     (none*)            STRING                0     String
    ... where field str has the predefined type string!
    When I now want to search the string (I know it would be very slow, but that's ok in the first step, later on we create an index table or sth like that)
      select * from ztas254_str_test
        into table lt_str_test
        where str like '%test%'.
    on activation of the program I get the error
    "The field "str" is a long string, so it cannot be used in, where on or having conditions."
    How can I directly select/search the str field in from the table? Besides from the like condition I tried to search with a range and IN. But the same error occurs.
    I'm testing on an ECC6.0 SP12.
    If someone ever tried somethink like that please let me know!
    Thanks in advance,
    Alej
    PS: * Points will be rewarded! *

    By now solved via an index table.

  • Select from 2 tables with common key and than left join(unique result)

    Hi,
    I have 2 tables that have a common id (Customer_id) and I have a third table which contain her key consist of 3 column ( Customer_id , rms_customer_id,billind_tree_id) and have the manager_name field
    I am using a left join because not all the customers have a manager.
    I need to take only the manager_name field from the left join but the problem is that I am not getting a unique name results because the customer_id is not the primary key(only part of )
    so I have use the following :
    left join
    ( select * from ACCOUNT_Manager am where
    rms_customer_id <= all (select rms_customer_id from ACCOUNT_Manager am2 where
    am2.customer_id = am.customer_id )) am
    on c.ID = am.CUSTOMER_ID (C is one of the first 2 tables with the ID as key)
    Is there anyway more efficient of doing it ?
    Thanks

    Please consider the following when you post a question. This would help us help you better
    1. New features keep coming in every oracle version so please provide Your Oracle DB Version to get the best possible answer.
    You can use the following query and do a copy past of the output.
    select * from v$version 2. This forum has a very good Search Feature. Please use that before posting your question. Because for most of the questions
    that are asked the answer is already there.
    3. We dont know your DB structure or How your Data is. So you need to let us know. The best way would be to give some sample data like this.
    I have the following table called sales
    with sales
    as
          select 1 sales_id, 1 prod_id, 1001 inv_num, 120 qty from dual
          union all
          select 2 sales_id, 1 prod_id, 1002 inv_num, 25 qty from dual
    select *
      from sales 4. Rather than telling what you want in words its more easier when you give your expected output.
    For example in the above sales table, I want to know the total quantity and number of invoice for each product.
    The output should look like this
    Prod_id   sum_qty   count_inv
    1         145       2 5. When ever you get an error message post the entire error message. With the Error Number, The message and the Line number.
    6. Next thing is a very important thing to remember. Please post only well formatted code. Unformatted code is very hard to read.
    Your code format gets lost when you post it in the Oracle Forum. So in order to preserve it you need to
    use the {noformat}{noformat} tags.
    The usage of the tag is like this.
    <place your code here>\
    7. If you are posting a *Performance Related Question*. Please read
       {thread:id=501834} and {thread:id=863295}.
       Following those guide will be very helpful.
    8. Please keep in mind that this is a public forum. Here No question is URGENT.
       So use of words like *URGENT* or *ASAP* (As Soon As Possible) are considered to be rude.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Data Mismatch while selecting from External Table

    Hi I am not able create an external table,I am trying to create and test table and able to create but when i selecting the data it showing data mismatch.I tried for an test data but it returned error.I want to load from an excel file saved as test.csv
    CREATE TABLE Per_ext
    CITY VARCHAR2(30),
    STATE VARCHAR2(20),
    ZIP VARCHAR2(10),
    COUNTRY VARCHAR2(30)
    ORGANIZATION EXTERNAL
    TYPE ORACLE_LOADER
    DEFAULT DIRECTORY dataload
    ACCESS PARAMETERS
    MISSING FIELD VALUES ARE NULL
    LOCATION ('test.csv')
    REJECT LIMIT UNLIMITED;
    test.csv file contents
    city ----------     state---------Zip------------country
    Bombay-----     MH------------34324-------india
    london-------London------1321---------UK
    Pune---------MH------------3224---------india
    Banglore----     Karnataka---11313-------india
    rgds
    soumya

    Hi Justin
    I am getting following error when i trying from toad
    ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-00554: error encountered while parsing access parameters
    KUP-01005: syntax error: found "comma": expecting one of: "badfile, byteordermark, characterset, column, data, delimited, discardfile, exit, fields, fixed, load, logfile, language, nodiscardfile, nobadfile, nologfile, date_cache, processing, readsize, string, skip, territory, variable"
    KUP-01007: at line 1 column 29
    ORA-06512: at "SYS.ORACLE_LOADER", line 19
    rgds
    soumya

  • Calling Web Service from PL/SQL (ORA-31011: XML parsing failed)

    hi all,
    i want to invoke a web service from PL/SQL.
    i found a soap_api package from "Tim Hall".
    but it gives error in "ealtas.soap_api.invoke function"
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00007: unexpected end-of-file encountered
    ORA-06512: at "SYS.XMLTYPE", line 48
    ORA-06512: at "EALTAS.SOAP_API", line 135
    ORA-06512: at line 44
    set scan off;
    declare
    P_ADRES_WS VARCHAR2(100) := 'http://<host>:<port>/dswsbobje/qaawsservices/biws?wsdl=1&cuid=AVhBxL14I2dDjz8yFoznRLY';
    P_ENVELOPE VARCHAR2(32767);
    P_FNC VARCHAR2(256) := 'runQueryAsAService';
    ol_req ealtas.soap_api.t_request;
    ol_resp ealtas.soap_api.t_response;
    message varchar2(500);
    BEGIN
    p_envelope := '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:db="DB_SUBS_BUDGET">
    <soapenv:Body>
    <db:runQueryAsAService>
    <db:login>DWH_BO</db:login>
    <db:password>Pass1234</db:password>
    </db:runQueryAsAService>
    </soapenv:Body>
    </soapenv:Envelope>
    ol_req := ealtas.soap_api.new_request(P_FNC, 'xmlns="'||P_ADRES_WS||'"');
    ol_resp := ealtas.soap_api.invoke(ol_req, P_ADRES_WS, p_fnc,P_ENVELOPE);
    ealtas.soap_api.show_envelope(p_envelope);
    message := ealtas.soap_api.get_return_value(ol_resp, 'Db_Timeid', 'xmlns:m="'||P_ADRES_WS||'"');
    DBMS_OUTPUT.PUT_LINE('AAAA -'||message);
    end;
    thanks.
    ealtas.

    AlexAnd thanks for your help.
    ACL is ok.
    can you help me about how can i edit this function. i tried many times but i could not do it :( .
    web service url : <host>:<port>/dswsbobje/qaawsservices/biws?WSDL=1&cuid=AVhBxL14I2dDjz8yFoznRLY
    what must be these variables values ?
    l_url :=
    l_namespace :=
    l_method :=
    l_soap_action :=
    l_result_name :=
    this is the xml;
    <?xml version="1.0" encoding="UTF-8" ?>
    - <definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:s0="DB_SUBS_BUDGET" xmlns:tns1="dsws.businessobjects.com" targetNamespace="DB_SUBS_BUDGET" xmlns="http://schemas.xmlsoap.org/wsdl/" name="queryasaservice">
    - <types>
    - <s:schema elementFormDefault="qualified" targetNamespace="DB_SUBS_BUDGET">
    - <s:element name="runQueryAsAService">
    - <s:complexType>
    - <s:sequence>
    <s:element name="login" type="s:string" />
    <s:element name="password" type="s:string" />
    </s:sequence>
    </s:complexType>
    </s:element>
    - <s:complexType name="Row">
    - <s:sequence>
    <s:element name="Db_Timeid" type="s:string" nillable="true" />
    <s:element name="Db_Tariff" type="s:string" nillable="true" />
    <s:element name="Grossadds" type="s:double" nillable="true" />
    <s:element name="Cancellations" type="s:double" nillable="true" />
    <s:element name="Netadds" type="s:double" nillable="true" />
    <s:element name="Subs" type="s:double" nillable="true" />
    <s:element name="Churn_P" type="s:double" nillable="true" />
    </s:sequence>
    </s:complexType>
    - <s:complexType name="Table">
    - <s:sequence>
    <s:element name="row" maxOccurs="unbounded" type="s0:Row" />
    </s:sequence>
    </s:complexType>
    - <s:element name="runQueryAsAServiceResponse">
    - <s:complexType>
    - <s:sequence>
    <s:element name="table" type="s0:Table" />
    <s:element name="message" type="s:string" />
    <s:element name="creatorname" type="s:string" />
    <s:element name="creationdate" type="s:dateTime" />
    <s:element name="creationdateformated" type="s:string" />
    <s:element name="description" type="s:string" />
    <s:element name="universe" type="s:string" />
    <s:element name="queryruntime" type="s:int" />
    <s:element name="fetchedrows" type="s:int" />
    </s:sequence>
    </s:complexType>
    </s:element>
    - <s:element name="QaaWSHeader">
    - <s:complexType>
    - <s:sequence>
    <s:element name="sessionID" type="s:string" minOccurs="0" maxOccurs="1" nillable="true" />
    <s:element name="serializedSession" type="s:string" minOccurs="0" maxOccurs="1" nillable="true" />
    </s:sequence>
    </s:complexType>
    </s:element>
    </s:schema>
    </types>
    - <message name="runQueryAsAServiceSoapIn">
    <part name="parameters" element="s0:runQueryAsAService" />
    <part name="request_header" element="s0:QaaWSHeader" />
    </message>
    - <message name="runQueryAsAServiceSoapOut">
    <part name="parameters" element="s0:runQueryAsAServiceResponse" />
    </message>
    - <portType name="QueryAsAServiceSoap">
    - <operation name="runQueryAsAService">
    <documentation>Get Web Service Provider server info</documentation>
    <input message="s0:runQueryAsAServiceSoapIn" />
    <output message="s0:runQueryAsAServiceSoapOut" />
    </operation>
    </portType>
    - <binding name="QueryAsAServiceSoap" type="s0:QueryAsAServiceSoap">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
    - <operation name="runQueryAsAService">
    <soap:operation soapAction="DB_SUBS_BUDGET/runQueryAsAService" style="document" />
    - <input>
    - <soap:header message="s0:runQueryAsAServiceSoapIn" part="request_header" use="literal">
    <soap:headerfault message="s0:runQueryAsAServiceSoapIn" part="request_header" use="literal" />
    </soap:header>
    <soap:body use="literal" parts="parameters" />
    </input>
    - <output>
    <soap:body use="literal" />
    </output>
    </operation>
    </binding>
    - <service name="DB_SUBS_BUDGET">
    <documentation />
    - <port name="QueryAsAServiceSoap" binding="s0:QueryAsAServiceSoap">
    <soap:address location="http://<host>:<port>/dswsbobje/qaawsservices/queryasaservice?&cuid=AVhBxL14I2dDjz8yFoznRLY&authType=secEnterprise&locale=en_US&timeout=60&ConvertAnyType=false" />
    </port>
    </service>
    </definitions>

  • XML parsing failed : Try to update FCRM field

    i created one field in fusion crm ,lead . and i have one table in my oracle EBS database i write one procedure which get data from table and pur into fcrm
    when i call procedure with static value it perfactly alright but ,when try to use xml parsing for all records give following error
    ORA-20001: An error was encountered - -31011 -ERRORORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00245: extra data after end of document
    Error at line 1
    ORA-06512: at "SCOTT.XX_LEAD_UPDATE", line 101
    ORA-06512: at line 1
    my procedure as follow :
    CREATE OR REPLACE PROCEDURE xx_lead_update
    --(p_leadid IN VARCHAR2,p_xx_kp_lead IN VARCHAR2)
    IS
        p_leadid   VARCHAR2(50);
        p_xx_kp_lead    VARCHAR2(50);
        CURSOR c1 IS
        SELECT FCRM_LEADID,XX_KP_LEAD
        FROM XX_KP_EBSLEAD 
        WHERE ID = 6;
      -- Construct xml payload, which is used to invoke the service.
          l_envelope VARCHAR2(32767) := '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:typ="http://xmlns.oracle.com/apps/marketing/leadMgmt/leads/leadService/types/" xmlns:lead="http://xmlns.oracle.com/oracle/apps/marketing/leadMgmt/leads/leadService/" xmlns:lead1="http://xmlns.oracle.com/apps/marketing/leadMgmt/leads/leadService/" xmlns:not="http://xmlns.oracle.com/apps/crmCommon/notes/noteService" xmlns:not1="http://xmlns.oracle.com/apps/crmCommon/notes/flex/noteDff/">
                                                <soapenv:Header/>
                                                    <soapenv:Body>
                                                        <typ:updateSalesLead>
                                                            <typ:salesLead>
                                                                    <lead:LeadId>'||p_leadid||'</lead:LeadId>
                                                                    <lead:xx_kp_lead_c>'||p_xx_kp_lead||'</lead:xx_kp_lead_c>
                                                            </typ:salesLead>
                                                        </typ:updateSalesLead>
                                                    </soapenv:Body>
                                        </soapenv:Envelope>';
                                      --PartyId: 300000000912340
      l_result         VARCHAR2(32767) := null;
      l_http_request   UTL_HTTP.req;
      l_http_response  UTL_HTTP.resp;
      v_len            number;
      v_txt            Varchar2(32767);
      soap_respond     CLOB;
      resp             xmltype;
      l_str            long;
      v_str            varchar2(100);
    BEGIN
            OPEN c1;
            LOOP
            FETCH c1 INTO p_leadid,p_xx_kp_lead;
            dbms_output.put_line ('p_xx_kp_lead '||p_xx_kp_lead);
            dbms_output.put_line ('p_leadid: '||p_leadid);
      -- Sets the Oracle wallet used for request, required for HTTPS
      UTL_HTTP.set_wallet('file:/apps/oracle/dnlclone/10.2.0/wallet','test1234');
      -- Creates new HTTP request
      l_http_request := UTL_HTTP.begin_request('https://aes.crm.ap2.oraclecloud.com:443/mklLeads/SalesLeadService?WSDL', 'POST','HTTP/1.1');
      -- Configure the authentication details on the request
      UTL_HTTP.SET_AUTHENTICATION(l_http_request, '[email protected]', 'DNLcrm*1');
      -- Configure the request content type to be xml and set the content length
      UTL_HTTP.set_header(l_http_request, 'Content-Type', 'text/xml');
      UTL_HTTP.set_header(l_http_request, 'Content-Length', LENGTH(l_envelope));
      -- Set the SOAP action to be invoked; while the call works without this the value is expected to be set based on standards
      UTL_HTTP.set_header(l_http_request, 'SOAPAction','http://xmlns.oracle.com/apps/marketing/leadMgmt/leads/leadService/');
      -- Write the xml payload to the request.
      UTL_HTTP.write_text(l_http_request, l_envelope);
      --  Get the response
      l_http_response := UTL_HTTP.get_response(l_http_request);
      utl_http.get_header_by_name(l_http_response, 'Content-Length', v_len, 1); -- Obtain the length of the response
        FOR i in 1..CEIL(v_len/32767) -- obtain response in 32K blocks just in case it is greater than 32K
        LOOP
            utl_http.read_text(l_http_response, v_txt, case when i < CEIL(v_len/32767) then 32767 else mod(v_len,32767) end);
            soap_respond := soap_respond || v_txt; -- build up CLOB
        END LOOP;
        UTL_HTTP.END_RESPONSE(l_http_response);
        resp:= xmltype.createxml(soap_respond); -- Convert CLOB to XMLTYPE
        --Using extract or extractvalue methods, retrieve value from a particular element/tag in the xml
        --v_str := resp.extract('/env:Envelope/env:Body/ns0:updateOpportunityResponse/ns2:result/ns3:EBSOrderNumber_c/text()','xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns0="http://xmlns.oracle.com/apps/sales/opptyMgmt/opportunities/opportunityService/types/" xmlns:ns2="http://xmlns.oracle.com/apps/sales/opptyMgmt/opportunities/opportunityService/types/" xmlns:ns3="http://xmlns.oracle.com/apps/sales/opptyMgmt/opportunities/opportunityService/"').getstringval();
        l_str := resp.extract('/*').getstringval();
        LOOP
        EXIT
        WHEN l_str IS NULL;
                     dbms_output.put_line (SUBSTR (l_str, 1, instr (l_str, chr(10)) - 1));
                     l_str := SUBSTR (l_str, instr (l_str, chr(10)) + 1);
        END LOOP;
        --dbms_output.put_line('EBS Order Number updated as: '||v_str);
            EXIT WHEN c1%NOTFOUND;
            END LOOP;
            CLOSE c1;
            COMMIT;
      EXCEPTION
      WHEN OTHERS THEN
      --dbms_output.put_line('Exception');
      RAISE_APPLICATION_ERROR(-20001,'An error was encountered - '
                                        ||SQLCODE||' -ERROR'||SQLERRM);
    END;

    Hi,
    Remove the exception handler (it's totally useless here) and tell us which line is really giving the error.

  • XML Parse error while loading an XML file

    HI Folks,
    I was trying to load and XML file into BODS.. The XML file is well-formed and the same when tested in other tools  is getting loaded without any issues..
    I have created a XML-File format with the corresponding XSD..
    But here in BODS it is giving - Parse error
    1) when i try to view the data of the source XML in my dataflow ..it is giving "XML Parser Failed".. and not able to show data..
    2) When I run my job i get the same pares error - with details as under..
    ---> Error here is "Unable to recognize element 'TAB' " or some time is say " Element TAB should be qualified"
    Please guide with this if you have any info..thanks
    I'm pasting the XML source file format here for your reference:--
      <?xml version="1.0" encoding="iso-8859-1" ?>
    - <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
    - <asx:values>
    - <TAB>
    - <items>
    + <CUSTOMER_RECORD>
      <CUSTOMER_NUMBER>1111111111</CUSTOMER_NUMBER>
      <NAME_1>ABC</NAME_1>
      <NAME_2>OFM/COMMERCIAL ACCOUNTS</NAME_2>
      <STREET_1>31 CENTER DRIVE MCS2045</STREET_1>
      <STREET_2 />
      <CITY>BETHESDA</CITY>
      <STATE_CODE>MD</STATE_CODE>
      <POSTAL_CODE>20892-2045</POSTAL_CODE>
      <COUNTRY_CODE>US</COUNTRY_CODE>
      <ORDER_BLOCK />
      <ERP_CREATE_DATE>20040610</ERP_CREATE_DATE>
      <ERP_CREATED_BY>DGUPTA</ERP_CREATED_BY>
      <ERP_MODIFY_DATE>20120201</ERP_MODIFY_DATE>
      <ERP_MODIFIED_BY>LWOHLFEI</ERP_MODIFIED_BY>
      <INDUSTRY_CODE>0103</INDUSTRY_CODE>
      <ACCOUNT_GROUP_ID>0001</ACCOUNT_GROUP_ID>
      <SALES_NOTE />
      <ADDRESS_NOTE />
      <CUSTOMER_CLASSIFICATION_CODE>02</CUSTOMER_CLASSIFICATION_CODE>
      <GLN_NUMBER />
      <PREVIOUS_ACCT_NO />
      <ACCOUNT_TYPE />
      <GAG />
      <SDI_ID />
      <HOSP_ID />
      <HIN />
      <DUNS />
      <PO_BOX />
      <POB_CITY />
      <POB_ZIP />
      <PHONE_NUMBER>77777</PHONE_NUMBER>
      <EMAIL_DOMAIN />
      <REQUESTER />
      <ERP_SOURCE_SYSTEM>ECC</ERP_SOURCE_SYSTEM>
      </CUSTOMER_RECORD>
    - <SALES_ORG_DATA>
    + <item>
      <CUSTOMER_NUMBER>1111111111</CUSTOMER_NUMBER>
      <SALES_ORG>0130</SALES_ORG>
      <CUSTOMER_GROUP>03</CUSTOMER_GROUP>
      <ORDER_BLOCK_CODE />
      <ERP_SOURCE_SYSTEM>ECC</ERP_SOURCE_SYSTEM>
      </item>
    + <item>
      <CUSTOMER_NUMBER>1111111111</CUSTOMER_NUMBER>
      <SALES_ORG>0120</SALES_ORG>
      <CUSTOMER_GROUP>11</CUSTOMER_GROUP>
      <ORDER_BLOCK_CODE />
      <ERP_SOURCE_SYSTEM>ECC</ERP_SOURCE_SYSTEM>
      </item>
      </SALES_ORG_DATA>
      </items>
      </TAB>
      </asx:values>
      </asx:abap>

    Pierre,
    Depending on the object "myLastFile", the method openDlg might not even exist (if the myLastFile object is not a File object, for instance). And I do not see any need for the myLastFile anyhow, as you are presenting a dialog to select a file to open. I recommend using the global ChooseFile( ) method instead. This will give you a filename as string in full path notation, or null when no file was selected in the dialog. I am not sure what your ExtendScript documentation states about the return value for ChooseFile, but if that differs from what I am telling you here, the documentation is wrong. So, if you replace the first lines of your code with the following it should work:
    function openXMLFile ( ) {
        var filename = ChooseFile ( "Choose XML file ...", "", "*.xml", Constants.FV_ChooseSelect );
    While writing this, I see that Russ has already given you the same advice. Use the symbolic constant value I indicated to use the ChooseFile dialog to select a single file (it can also be used to select a directory or open a file - but you want to control the opening process yourself). Note that this method allows you to set a start directory for the dialog (second parameter). The ESTK autocompletion also gives you a fifth parameter "helplink" which is undocumented and can safely be ignored.
    Good luck
    Jang

  • ORA-31011: XML parsing failed ORA-19202: Error occurred in XML processing L

    Hi There,
    I am trying to load XML data [Given Below] into a table using "Load XML Data" option.
    <?xml version="1.0"?>
    <ROWSET>
    <ROW>
    <ID>13</ID>
    <TYPE_SEQ>8</TYPE_SEQ>
    <TYPE>B749</TYPE>
    <TYPE_DESC>B758</_TYPE_DESC>
    <EFFECTIVE_FROM>2099-01-01</EFFECTIVE_FROM>
    <EFFECTIVE_TO>2099-01-01</EFFECTIVE_TO>
    <CREATED_BY>958344</CREATED_BY>
    <CREATED_ON>2099-01-01</CREATED_ON>
    <UPDATED_BY>172283</UPDATED_BY>
    <UPDATED_ON>2099-01-01</UPDATED_ON>
    </ROW>
    </ROWSET>
    It throws the following error.
    ORA-31011: XML parsing failed ORA-19202: Error occurred in XML processing LPX-00222: error received from SAX callback function
    Can any one advice the solution please.
    -Sudheer.

    Hi Sudheer,
    This is caused by the date format you are using. Probably it is not matching with your NLS settings. Check your NLS settings, what the date format is, and use that in the XML.
    Check it with this code:
    SELECT XMLELEMENT("date", sysdate) FROM dual;Make sure, you have your NLS_DATE settings in the same format.
    Check it with:
    SELECT * FROM v$nls_parameters WHERE parameter = 'NLS_DATE_FORMAT'And then make sure it is the same by setting for example:
      ALTER SESSION SET NLS_DATE_FORMAT = 'YYYY-MM-DD';Greetings,
    Rutger

  • XML parsing failed

    SELECT UPDATEXML(Document(doc).ReformedContent, Variables(i).nodepath||'/text()', 'Jaunaa veertiiiba', 'xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"')
                  INTO Document(doc).ReformedContent
                  FROM DUAL
                  WHERE regexp_substr(Document(doc).ReformedContent,'#.*#') = Variables(i).nodevalue;
             This is place where get error: "XML parsing failed". Can somebody help please.
    Document(doc).ReformedContent -> XMLType which is in record based table
    Varaibles(i) -> object type from table of object types.

    No database version?
    No example of XML it's trying to process?
    No help currently available.

  • XML parsing failed because ""

    Hi ,
         I am facing issue while building composite in jdeveloper.It is showing below error.Please Suggest how to proceed further.
    Error: XML parsing failed because ""
    Buildfile: C:\Oracle\Middleware\jdeveloper\bin\ant-sca-compile.xml
    scac:
         [scac] Validating composite "C:\MR96\BPEL Services\MOOA_businesservices\AddComponent\composite.xml"
         [scac] Setting BPELC option 'classpath' to C:\Oracle\Middleware\modules\com.oracle.toplink_1.0.0.0_11-1-1-5-0.jar;C:\Oracle\Middleware\modules\org.eclipse.persistence_1.1.0.0_2-1.jar;C:\Oracle\Middleware\modules\com.bea.core.antlr.runtime_2.7.7.jar;C:\Oracle\Middleware\modules\javax.persistence_1.0.0.0_2-0-0.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.xdk_11.1.0\xmlparserv2.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.xdk_11.1.0\xml.jar;C:\Oracle\Middleware\jdeveloper\jdev\extensions\oracle.sca.modeler.jar;C:\Oracle\Middleware\jdeveloper\soa\modules\oracle.soa.fabric_11.1.1\fabric-runtime.jar;C:\Oracle\Middleware\jdeveloper\soa\modules\oracle.soa.mgmt_11.1.1\soa-infra-mgmt.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.fabriccommon_11.1.1\fabric-common.jar;C:\Oracle\Middleware\jdeveloper\soa\modules\oracle.soa.bpel_11.1.1\orabpel.jar;C:\Oracle\Middleware\jdeveloper\soa\modules\oracle.soa.mediator_11.1.1\mediator_client.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.mds_11.1.1\mdsrt.jar;;C:\MR96\BPEL Services\MOOA_businesservices\AddComponent\SCA-INF\classes
         [scac] java.lang.NullPointerException
         [scac] at com.collaxa.cube.lang.compiler.map.bpel.BPELProcess.lookupInitiationInfo(BPELProcess.java:1010)
         [scac] at com.collaxa.cube.lang.compiler.map.bpel.BPELProcess.addOnMessage(BPELProcess.java:903)
         [scac] at com.collaxa.cube.lang.compiler.bpel.BpelParser.parseOnMessage(BpelParser.java:1597)
         [scac] at com.collaxa.cube.lang.compiler.bpel.BpelParser.startElement(BpelParser.java:587)
         [scac] at com.collaxa.cube.lang.compiler.bpel.BpelParser.parseElement(BpelParser.java:492)
         [scac] at com.collaxa.cube.lang.compiler.bpel.BpelParser.parseElement(BpelParser.java:499)
         [scac] at com.collaxa.cube.lang.compiler.bpel.BpelParser.parseElement(BpelParser.java:499)
         [scac] at com.collaxa.cube.lang.compiler.bpel.BpelParser.parseElement(BpelParser.java:499)
         [scac] at com.collaxa.cube.lang.compiler.bpel.BpelParser.parseElement(BpelParser.java:499)
         [scac] at com.collaxa.cube.lang.compiler.bpel.BpelParser.parseElement(BpelParser.java:499)
         [scac] at com.collaxa.cube.lang.compiler.bpel.BpelParser.parseElement(BpelParser.java:499)
         [scac] at com.collaxa.cube.lang.compiler.bpel.BpelParser.parseElement(BpelParser.java:499)
         [scac] at com.collaxa.cube.lang.compiler.bpel.BpelParser.parseElement(BpelParser.java:499)
         [scac] at com.collaxa.cube.lang.compiler.bpel.BpelParser.parseElement(BpelParser.java:499)
         [scac] at com.collaxa.cube.lang.compiler.bpel.BpelParser.parseElement(BpelParser.java:499)
         [scac] at com.collaxa.cube.lang.compiler.bpel.BpelParser.parseElement(BpelParser.java:499)
         [scac] at com.collaxa.cube.lang.compiler.bpel.BpelParser.parseElement(BpelParser.java:499)
         [scac] at com.collaxa.cube.lang.compiler.bpel.BpelParser.parseElement(BpelParser.java:499)
         [scac] at com.collaxa.cube.lang.compiler.bpel.BpelParser.parseElement(BpelParser.java:499)
         [scac] at com.collaxa.cube.lang.compiler.bpel.BpelParser.parseElement(BpelParser.java:499)
         [scac] at com.collaxa.cube.lang.compiler.bpel.BpelParser.parseElement(BpelParser.java:499)
         [scac] at com.collaxa.cube.lang.compiler.bpel.BpelParser.parseElement(BpelParser.java:499)
         [scac] at com.collaxa.cube.lang.compiler.bpel.BpelParser.parse(BpelParser.java:455)
         [scac] at com.collaxa.cube.lang.compiler.bpel.BpelParser.parse(BpelParser.java:402)
         [scac] at com.collaxa.cube.lang.compiler.bpel.BPELValidator.validate(BPELValidator.java:65)
         [scac] at com.collaxa.cube.lang.compiler.BPEL1Processor.validate(BPEL1Processor.java:329)
         [scac] at com.collaxa.cube.lang.compiler.BPEL1Processor.process(BPEL1Processor.java:153)
         [scac] at com.collaxa.cube.lang.compiler.CubeParserHelper.compile(CubeParserHelper.java:47)
         [scac] at oracle.fabric.bpel.bpelc.BPELComponentValidator.validate(BPELComponentValidator.java:40)
         [scac] at oracle.soa.scac.ValidateComposite.validateComponentTypeServicesReferences(ValidateComposite.java:1051)
         [scac] at oracle.soa.scac.ValidateComposite.doValidation0(ValidateComposite.java:502)
         [scac] at oracle.soa.scac.ValidateComposite.doValidation(ValidateComposite.java:481)
         [scac] at oracle.soa.scac.ValidateComposite.run0(ValidateComposite.java:206)
         [scac] at oracle.soa.scac.ValidateComposite.run(ValidateComposite.java:187)
         [scac] at oracle.soa.scac.ValidateComposite.main(ValidateComposite.java:179)
         [scac] AddComponentProcess.bpel: error: XML parsing failed because ""
    BUILD FAILED
    C:\Oracle\Middleware\jdeveloper\bin\ant-sca-compile.xml:278: Java returned: 1 Check log file : C:\MR96\BPEL Services\MOOA_businesservices\AddComponent\SCA-INF\classes\scac.log for errors
    Total time: 1 minute 27 seconds
    Thanks

    Hi,
    Please give a try to this:(Take back up before doing this)
    1. Download PATCH 11066656 .
    2. Go to your JDEV_HOME/jdeveloper/soa/modules/oracle.soa.bpel_11.1.1/
    and make a backup copy of orabpel.jar.
    3. Copy the file orabpel.jar from patch 11066656 to JDEV_HOME/jdeveloper/soa/modules/oracle.soa.bpel_11.1.1/.
    4. Restart JDeveloper.
    5. Now the project should compile without the SCAC error.
    This was fixed in 11.7 but since you are getting SCAC so asked the above action plan.
    If it did not resolves see below steps:
    =============================================================
    File will be there but a class is missing which might cause this.
    If you have same soa version 11.1.1.7.0 can you check that fabricruntime.jar from soa home and jdev home size is same?
    In soa home it will be under Oracle_SOA/soa/modules directory.
    If size is not same replace jdev fabricruntime.jar from soa home.
    Also can you confirm on:
    Please let me know whether you are able to deploy from EM or getting same error during deployment also? or from ant script.

  • ORA-31011: XML parsing failed

    Hi
    I am on client version 9.2.0.4 and try to test the following query
    select XMLELEMENT("DATE", sysdate) from dual;
    I am getting the error ORA-31011:XML parsing failed
    Can anybody suggest a solution?
    Thanks for your reply in advance
    Murali

    Murali ,
    you have mentioned about the client version but what is the server version to which
    you are connected ? Pls checkout that. it should be 9.2.0.4 and above.
    Connected to:
    Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.4.0 - Production
    SQL> select XMLELEMENT("DATE", sysdate) from dual;
    XMLELEMENT("DATE",SYSDATE)()
    XMLTYPE()
    SQL> ed
    Wrote file afiedt.buf
      1* select XMLELEMENT("DATE", sysdate).GetStringVal() from dual
    SQL> /
    XMLELEMENT("DATE",SYSDATE).GETSTRINGVAL()
    <DATE>05-SEP-05</DATE>
    SQL> Since my client version is 9.0.1.3.0 i have to use GetStringVal() method to extract the contents.

Maybe you are looking for

  • Black Screen With Xorg 1.6.1

    A few days ago, I upgraded xorg to 1.6.1 and probably also upgraded to the newest intel video driver. Since then, I get a black screen with an "X" cursor every time I try to start xfce4. Installing xf86-video-intel-legacy doesn't help, maybe I am mis

  • Preview pdf files in the desktop with Adobe Reader Touch .. is it possible?

    preview pdf files in the desktop with Adobe Reader Touch .. is it possible?

  • Cannot relink

    I get following messages when try to relink all: cut: /tmp/tempmakes: No such file or directory/bin/rm: /tmp/tempmakes: No such file or directory/usr/bin/find: bin: No such file or directory/usr/bin/find: bin: No such file or directory/bin/cat: /tmp/

  • Sync session failed to finish.

    I can't sync my iphone it fails at the last step and says "sync session failed to finish" - help.....

  • Customer Order Tolerance Fields.

    These fields are not maintainable in VA01 and VA02 in our ECC 6.0 system.  We can't find in config where to allow and open these fields up to make them so the users can change the values of these two fields (over and under tolerance on the shipping t