ORA-31011 error over a "?"
Hi all. I've got a database table which has a CLOB column and a Sys.XMLType column. In order to store the XML data, I insert the record with an EMPTY_CLOB() value, get a reference to the CLOB (as a java.sql.Clob object). Once I have the Java Clob object (the instance of oracle.sql.CLOB), I write my XML data to it. Once it's in the CLOB, I can update the original record by passing the Clob object in as a parameter to the update statement and SYS.XMLType.createXML(clobValue).
I have an XML file which is as follows:
<?xml version="1.0" encoding="UTF-8"?>
<CMProduct xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.adc.com/schema/cm/v4.0/CMProd
uct" xsi:schemaLocation="http://www.adc.com/schema/cm/v4.0/CMProduct http://www.adc.com/schema/cm/v4.0/CMProduct
.xsd">
<class1>Peterson</class1>
<class2>1200</class2>
<class3>110 Minutes</class3>
<class4>235 grams</class4>
<class5>$49</class5>
<comments>This low price means the minimum package cost for new- approved customers who remain connected to th
e WonderNet? service for 12 continuous months is $454</comments>
<description>Peterson 1200-110 Minutes-$49</description>
<imageRef href="CMImage/mppet1200.xml">mp-pet-1200</imageRef>
<name>MP-PET-1200</name>
<securityGroup href="CMSecurityGroup/Default.xml">Default</securityGroup>
</CMProduct>
I've gone into the code, to see that the Clob value is correct. However, when the createXml is called, I get the error...
java.sql.SQLException: ORA-31011: XML parsing failed
ORa-19202: Error occurred in XML processing
LPX-00217: invalid character 65533 (\uFFFD)
ORA-06512: at "SYS.XMLTYPE", line 0
ORA-06512: at line 1
When I see what the character \uFFFD is, it turns out to be "?".
So, the createXML is blowing up because I have a question mark in the XML file ... presumably the
<?xml version="1.0" encoding="UTF-8"?>
line. Which to my knowledge is perfectly correct XML.
It also seems to quite happily accept other XML documents with the "?" in it. So is there any idea as to what's causing this error?
Thanks,
Ed
Hmm, probably doesn't like the ? in the middle of the comments section... :) I'll keep looking....
Similar Messages
-
ORA-31011 Error. Help!
Guys,
I am running this simple query:
SELECT XMLELEMENT("mydate", sysdate) FROM dual;
Getting the below error:
ERROR:
ORA-31011: XML parsing failed
Database version:
SQL> select * from v$version;
BANNER
Oracle9i Enterprise Edition Release 9.2.0.5.0 - 64bit Production
PL/SQL Release 9.2.0.5.0 - Production
CORE 9.2.0.6.0 Production
TNS for HPUX: Version 9.2.0.5.0 - Production
NLSRTL Version 9.2.0.5.0 - Production
Is this because of encoding/characterset issues ? Any help to pin-point what the problem is, would be appreciated. Thank You!SQL> SELECT XMLELEMENT("mydate", sysdate) FROM dual;
XMLELEMENT("MYDATE",SYSDATE)
<mydate>02-JUL-07</mydate>
SQL> select * from v$version;
BANNER
Oracle9i Enterprise Edition Release[b] 9.2.0.8.0 - 64bit Production
PL/SQL Release 9.2.0.8.0 - Production
CORE 9.2.0.8.0 Production
TNS for HPUX: Version 9.2.0.8.0 - Production
NLSRTL Version 9.2.0.8.0 - Production -
Character set Conversion (US7ASCII to AL32UTF8) -- ORA-31011 problem
Hello,
We've run into some problems as part of our character set conversion from US7ASCII to AL32UTF8. The latest problem is that we have a query that works in US7ASCII, but after converting to AL32UTF8 it no longer works and generates an ORA-31011 error. This is very concerning to us as this error indicates an XML parsing problem and we are doing no XML whatsoever in our DB. We do not have XML columns (nor even CLOBs or BLOBs) nor XML tables and it's not XMLDB.
For reference, we're running 11.2.0.2.0 over Solaris.
Has anyone seen this kind of problem before?
If need be, I'll find a way to post table definitions. However, it's safe to assume that we are only using DATE, VARCHAR2 and NUMBER column types in these tables. All of the tables are local to the DB.
ThanksWe converted using the database using scripts I developed. I'm not quite sure how we converted is relevant, other than saying that we did not use the Oracle conversion utility (not csscan, but the GUI Java tool).
A summary:
1) We replaced the lossy characters by parsing a csscan output file
2) After re-scanning with csscan and coming up clean, our DBA converted the database to AL32UTF8 (changed the parameter file, changing the character set, switched the semantics to char, etc).
3) Final step was changing existing tables to use char semantics by changing the table schema for VARCHAR2 columns
Any specific steps I cannot easily answer, I worked with a DBA at our company to do this work. I handled the character replacement / DDL changes and the DBA ran csscan & performed the database config changes.
Our actual error message:
ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00210: expected '<' instead of '�Error 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.
Error at Line: 24 Column: 15
This seems to match the the document ID referenced below. I will ask our DBA to pull it up and review it.
Please advise if more information is needed from my end. -
Getting "ORA-31011: XML parsing failed" using xmlAGG as rownum exceeds 1000
I have a following script which is working and creating xml output when the rownum < 1000, but as the rownum <2000 clause is used, it is throwing "ORA-31011: XML parsing failed" error.
There are about 2 million recirds that I need to extract in the xml file. Is there any way I can do that without creating 500 files?
I am new in XML DB and any help/suggestion/input will be highly appreciated.
Thanks.
---------------- script--------------------
SET SERVEROUTPUT ON
DECLARE
v_xml XMLTYPE;
v_blob BLOB;
v_data_length NUMBER;
-- Loop Control Variables
v_offset NUMBER DEFAULT 1;
v_chunk CONSTANT NUMBER DEFAULT 4000;
-- v_ctx DBMS_XMLGen.ctxHandle;
v_file Utl_File.File_Type;
BEGIN
-- Create XML context.
SELECT XMLELEMENT("COMBO_NETWORK", XMLAGG (IFC_BILL_LOC))
INTO v_xml
FROM (
SELECT XMLELEMENT
("CLAIM",
XMLFOREST(
ib.clm_num as "CLM_NUM",
NVL(ib.old_clm_num,' ') as "ALT_CLM_NUM",
DECODE(ib.clm_stat_cde,1,'OPEN','CLOSED') as "CLM_STATUS",
ib.SSN as "SSN",
ib.CLMT_LAST_NAM as "LAST_NAME",
ib.CLMT_FIRST_NAM as "FIRST_NAME",
TO_CHAR(ib.CLMT_DOB,'RRRRMMDD') as "DOB",
TO_CHAR(ib.CLMT_DOI,'RRRRMMDD') as "DOI",
ib.ER_NAM as "EMPLOYER_NAME",
sflo.cde AS "DISTRICT_OFFICE",
ib.ADD_UPDTE_DEL_FLG as "ADD_UPDATE_DELETE",
XMLFOREST(ib.CLMT_FST_LINE_ADR||' '||ib.CLMT_SND_LINE_ADR as "STREET",
ib.CLMT_CITY_ADR AS "CITY",
ib.CLMT_STATE_ADR as "STATE",
ib.CLMT_ZIP_CDE_ADR as "ZIP",
' ' as "PHONE" ) AS "CLAIMNT_ADDRESS",
DECODE(ib.CLMT_GENDER,1,'M',2,'F',' ') as "CLAIMNT_GENDER",
XMLFOREST(ib.ADJ_LAST_NAM as "LAST_NAME",
ib.ADJ_FIRST_NAM as "FIRST_NAME",
au.PHONE_NUM as "PHONE",
au.USER_EMAIL as "EMAIL") as "ADJUSTER",
NVL(ib.CATASTROPHE_FLG,'N') as "CATASTROPHE_FLAG"
IFC_BILL_LOC
FROM IFACE_BILL_CLAIM_TRANS ib, SCIF_LOCATIONS sflo, APPLICATION_USERS au
WHERE ib.comb_transmit_dte IS NULL
AND ib.SFLO_IDN = sflo.idn
AND ib.adj_last_nam = UPPER(au.user_last_nam)
AND ib.adj_first_nam = UPPER(au.user_first_nam)
AND sflo.cde = 'NF'
AND rownum < 1000); -- Failes parsing as rownum < 2000 is used.
-- Turn the XML into a BLOB
v_blob := v_xml.getblobval (1);
v_data_length := DBMS_LOB.getlength (v_blob);
-- Output XML document to file.
v_file := Utl_File.FOpen('/u08/test/testdev/interface/out', 'result1.xml', 'wb', v_chunk);
LOOP
EXIT WHEN v_offset > v_data_length;
UTL_FILE.put_raw (v_file, DBMS_LOB.SUBSTR (v_blob, v_chunk, v_offset),
TRUE);
v_offset := v_offset + v_chunk;
END LOOP;
Utl_File.FClose(v_file);
EXCEPTION
WHEN NO_DATA_FOUND
THEN
-- We won't write any data, or even open the file,
-- if the query return no rows
NULL;
END;
--------------------- script end--------------------------
Following is the version of y database:
SQL> col comp_name format a45
SELECT comp_name, status, substr(version,1,10) as version
FROM dba_registry;
SQL> SQL> 2
COMP_NAME STATUS VERSION
Oracle Database Catalog Views VALID 10.2.0.4.0
Oracle Database Packages and Types VALID 10.2.0.4.0
JServer JAVA Virtual Machine VALID 10.2.0.4.0
Oracle Database Java Packages VALID 10.2.0.4.0
Oracle XDK VALID 10.2.0.4.0
Oracle XML Database VALID 10.2.0.4.0
6 rows selected.
SQL>Edited by: mdrake on Feb 4, 2010 3:55 PMIf you have the fix for bug 8246403 you can also control the behavoir with events. This avoids having to use explict translate operations on each column thay may contain bad data. Note this patch also has the effect of replacing the ORA-31011 error with the ORA-31061 error. Also note it is likely this error number will be changed again in the near future.
SQL> --
SQL> -- Replace with ?
SQL> --
SQL> alter session set events = '19119 trace name context forever, level 0x100000'
2 /
Session altered.
SQL> select xmlElement
2 (
3 "Result",
4 xmlAgg
5 (
6 xmlElement("Data",MY_DATA)
7 )
8 )
9 from T1
10 /
XMLELEMENT("RESULT",XMLAGG(XMLELEMENT("DATA",MY_DATA)))
<Result><Data>AAAA</Data><Data>BB?BB</Data><Data>CCCC</Data></Result>
SQL> --
SQL> -- Replace with Character Reference
SQL> --
SQL> alter session set events = '19119 trace name context forever, level 0x200000'
2 /
Session altered.
SQL> select xmlElement
2 (
3 "Result",
4 xmlAgg
5 (
6 xmlElement("Data",MY_DATA)
7 )
8 )
9 from T1
10 /
XMLELEMENT("RESULT",XMLAGG(XMLELEMENT("DATA",MY_DATA)))
<Result><Data>AAAA</Data><Data>BB�BB</Data><Data>CCCC</Data></Result>
SQL>
SQL> --
SQL> -- Remove Bad Characters
SQL> --
SQL> alter session set events = '19119 trace name context forever, level 0x400000'
2 /
Session altered.
SQL> select xmlElement
2 (
3 "Result",
4 xmlAgg
5 (
6 xmlElement("Data",MY_DATA)
7 )
8 )
9 from T1
10 /
XMLELEMENT("RESULT",XMLAGG(XMLELEMENT("DATA",MY_DATA)))
<Result><Data>AAAA</Data><Data>BBBB</Data><Data>CCCC</Data></Result>
SQL>
SQL>Edited by: mdrake on Feb 4, 2010 3:45 PM
Edited by: mdrake on Feb 4, 2010 3:46 PM
Edited by: mdrake on Feb 4, 2010 3:47 PM -
ORA-28868 error when calling Web service over HTTPS from PL/SQL utl_http
I am getting error message ORA-28868 error when calling Web service over HTTPS from PL/SQL utl_http PL/SQL package,
when browsed through some of the messages they point to setting Oracle Wallet Manager.
I am trying to connect
Any idea on how to resolve this issue ?
your input is appreciated.
Thanks
RaviDuplicate post ... please ignore.
-
ORA-31011: XML parsing failed ORA-19202: Error occurred in XML processing
Hi,
I am trying to update an already existing Sales Order through PO Change Inbound 860. When i am performing changes in the line quantity and scheduled ship date with operation code as "Update" then it is successfully updating the Order and also we are able to generate the POAck for the updated sales order lines. But when i am rejecting one of the PO change lines by checking rejected flag, then order is getting imported successfully(I mean sales order is getting updated successfully) but during the POAck Generation i.e. 865 its raising "*ORA-31011: XML parsing failed ORA-19202: Error occurred in XML processing LPX-00103: Warning: document structure does not match DTD Error at line 1*" at XML Gateway. we are using XML Gateway to process the orders, can somebody help me to get rid of this issue. Thanks in advance.
Thanks,
Sunil ChauhanHi Kishan
Thanks for the reply.
Because this is an outbound transaction so i can not provide you the XML file as we are facing issue to generate the same. Also we are using oracle seeded PO outbound Ack map.
In addition i can provide you the DTD file.
<!-- ==================================================== -->
<!ENTITY % RESOURCES SYSTEM "oagis_resources.dtd">
%RESOURCES;
<!-- ==================================================== -->
<!ELEMENT ACKNOWLEDGE_PO_008 (CNTROLAREA, DATAAREA+)>
<!ATTLIST VERB
value CDATA #FIXED "ACKNOWLEDGE"
>
<!ATTLIST NOUN
value CDATA #FIXED "PO"
>
<!ATTLIST REVISION
value CDATA #FIXED "008"
>
<!ELEMENT DATAAREA (ACKNOWLEDGE_PO)
>
<!ELEMENT ACKNOWLEDGE_PO (POORDERHDR, POORDERLIN*)
>
<!ELEMENT POORDERHDR ((%DATETIME.DOCUMENT;)?, (%OPERAMT.EXTENDED.T;)?, POID, POTYPE, ACKREQUEST?, CONTRACTB?, CONTRACTS?, DESCRIPTN?, NOTES*, OPRAMTAUTH?, PORELEASE?, TAXWHEXMPT?, USERAREA?, ACKHEADER, ATTCHREF*, CHARGE*, PARTNER*, POTERM*)
>
<!ELEMENT ACKHEADER (SENDER, (%DATETIME.PROMDELV;)?, (%DATETIME.PROMSHIP;)?, ACKCODE, DESCRIPTN?, NOTES*, SALESORDID?, USERAREA?)
>
<!ELEMENT POTERM (DESCRIPTN?, TERMID?, ((DAYOFMONTH, PROXMONTH) | DAYSNUM), ((%OPERAMT.EXTENDED.T;) | (%QUANTITY.PERCENT;)), USERAREA?)
>
<!ELEMENT POORDERLIN ((%QUANTITY.ORDERED;), (%DATETIME.NEEDDELV;)?, (%OPERAMT.UNIT.T;)?, POLINENUM, DRAWING?, HAZRDMATL?, ITEMRV?, ITEMRVX?, NOTES*, PACKING?, POLNSTATUS?, TAXWHEXMPT?, ((DESCRIPTN, ITEM?, ITEMX?, UPC?) | (ITEM, ITEMX?, UPC?) | (ITEMX, UPC?) | (UPC)), USERAREA?, ACKLINE*, ATTCHREF*, CHARGE*, DISTRIBUTN*, PARTNER*, POTERM*, POSUBLINE*, POLINESCHD*)
>
<!ELEMENT ACKLINE ((%DATETIME.PROMDELV;)?, (%DATETIME.PROMSHIP;)?, (%QUANTITY.ORDERED;)?, ACKCODE, NOTES*, SALESORDID?, USERAREA?)
>
<!ELEMENT POSUBLINE ((%QUANTITY.ITEM;), DRAWING?, ITEMRV?, ITEMRVX?, PSBLINENUM?, ((DESCRIPTN, ITEM?, ITEMX?, UPC?) | (ITEM, ITEMX?, UPC?) | (ITEMX, UPC?) | (UPC)), USERAREA?)>
<!ELEMENT POLINESCHD ((%DATETIME.NEEDDELV;), (%QUANTITY.ORDERED;), DESCRIPTN?, PSCLINENUM?, USERAREA?)
>
Thanks,S
--Sunil -
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 -
ORA-01461 error inserting over DB Link
We receive an ORA-01461 error (can bind a LONG value only for insert into a LONG column) when using HTMLDB to insert into a remote table over a database link. The remote table has two VARCHAR2 and one NUMBER columns - it does not contain a LONG column. Inserting via SQL*Plus is OK.
Any ideas anyone?
BarryAnyone found a solution to this. I'm getting the same error. HTMLDB 1.6
I have TableA and TableB in remote db1. TableA=Master, TableB=Detail. Both tables have single column PK generated by a trigger.
In db2 I created a schema with viewA on TableA@db1 and viewB etc.
HTMLDB app accesses views.
I've tried to create a tabular form page to insert update delete into viewB but can only delete. Insert & update produces error:
Error in mru internal routine: ORA-20001: Error in MRU: row= 1, ORA-01461: can bind a LONG value only for insert into a LONG column ORA-02063: preceding line from ORIXREPORTS.ORIXNZ.CO.NZ, update "IT_HTMLDB"."SCHEDULED_REPORT_PARAMETERS" set "SCHEDULED_REPORT_PARAMETER_ID" = :b1, "SCHEDULED_REPORT_ID" = :b2, "NAME" = :b3, "VALUE" = :b4, "VALUE_TYPE" = :b5 where "SCHEDULED_REPORT_PARAMETER_ID" = :p_pk_col
Have also tried a Master Detail page with similar problems.
I have only managed to get this to work by using the "Form on a Table with Report, 2 Pages" page creation option and then specifiying that Detail is editied in separate page. However this means deletes & updates are slow for the user as cannot do multi updates and deletes etc.
Any help appreciated.
Cheers
Ian -
PL/SQL: ORA-04052: error occurred when looking up remote object.
Hi All,
I'm getting the following error message while executing a PL/SQL Block.
PL/SQL: ORA-04052: error occurred when looking up remote object UPLDUSER.filestatushistory@FTS
ORA-00604: error occurred at recursive SQL level 1
ORA-03106: fatal two-task communication protocol error
ORA-02063: preceding line from FTSStatement
declare
v_coun number;
begin
select count(*) into v_coun
from updluser.filestatushistory@fts;
end;Back ground of the situation as follows,
My DataBase version 10.2.0.3 DB Name :DB1
Table Owner : UPLDUSER
Table Name : FILESTATUSHISTORY
I have a report user on the same database and I have grant all on the above table to report user
Report User : RPT_FTS
SQL> GRANT ALL ON FILESTATUSHISTORY_V TO RPT_FTS;Now Please find the below database details where I'm getting subjected error.
Database version : 9.2.0.8
DB Name : DB2
User Name : RPT_REPORTS
I Have create a dblink from RPT_REPORTS to RPT_FTS on DB1 and the dblink works fine. But getting the above error while running it.
but When I do the same other 10.2.0.3 db , the above PL/SQL block works fine without any problem.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Now the strange about this is that I have Created a new table on DB1 db like below;
SQL> CREATE TABLE UPLDUSER.ABC AS SELECT * FROM FILESTATUSHISTORY;and retry my code on DB2 (9.2.0.8) after changing the table to ABC and it worked. Now I don't know whats wrong with a original table(FILESTATUSHISTORY).
To over come the problem and a work-a-round method I create a view on the DB1 (RPT_FTS) like the below
SQL> CREATE VIEW FILESTATUSHISTORY AS SELECT * FROM UPLDUSER.FILESTATUSHISTORY;and was able to run the PL/SQL block Remotely.
Just wants To know what whould have been the cause for this .
Cheers
KanchanaHi Kanchana,
Perhaps following link of google search has answer to your query
ORA-04052. The search result contains some useful articles whose URLs I shan't post in the forums.
HTH!
*009* -
Ora-00604 error while runing script
Hi Guys..
Let me describe the environment
My OS is windows 2008 R2 server 64-bit.. Database version is Oracle 11gR2
I recently upgraded the oracle DB from 11gr1 to 11gr2 .It upgraded successfully without any errors and the updated DB on 11gr2 is working fine..
Now one of the employee is getting below errror while executing a script which calles a plsql package.
ORA-00604: error occurred at recursive SQL level 1
ORA-00001: unique constraint (SYS.I_PLSCOPE_SIG_IDENTIFIER$) violated
I googled around and found that its related to plscope_settings parameter..
select name,value from v$parameter where name = 'plscope_settings';
the output was IDENTIFIERS:NONE
Further investigations revealed that my DB is running with the (default) init-parameter “plscope_settings=IDENTIFIERS:NONE”, while my SQL-Developer (v3.0) started every session with the default-setting “plscope_settings=IDENTIFIERS:ALL” (see menu EXTRAS>PREFERENCES>DATABASE>PL/SQL-COMPILER).
so i changed the settings to NONE in Sql Developer too..then recompiled the package but the error is still there when i execute the same package..
Its high time..i need to resolve it over the weekend..so can u plz share ur valuable comments..
Let me if u want any info from my end so that u get more clearer about the prob...sai121 wrote:
Hi Guys..
Let me describe the environment
My OS is windows 2008 R2 server 64-bit.. Database version is Oracle 11gR2
I recently upgraded the oracle DB from 11gr1 to 11gr2 .It upgraded successfully without any errors and the updated DB on 11gr2 is working fine..
Now one of the employee is getting below errror while executing a script which calles a plsql package.
ORA-00604: error occurred at recursive SQL level 1
ORA-00001: unique constraint (SYS.I_PLSCOPE_SIG_IDENTIFIER$) violated
I googled around and found that its related to plscope_settings parameter..
select name,value from v$parameter where name = 'plscope_settings';
the output was IDENTIFIERS:NONE
Further investigations revealed that my DB is running with the (default) init-parameter “plscope_settings=IDENTIFIERS:NONE”, while my SQL-Developer (v3.0) started every session with the default-setting “plscope_settings=IDENTIFIERS:ALL” (see menu EXTRAS>PREFERENCES>DATABASE>PL/SQL-COMPILER).
so i changed the settings to NONE in Sql Developer too..then recompiled the package but the error is still there when i execute the same package..
Its high time..i need to resolve it over the weekend..so can u plz share ur valuable comments..
Let me if u want any info from my end so that u get more clearer about the prob...
bcm@bcm-laptop:~$ oerr ora 1
00001, 00000, "unique constraint (%s.%s) violated"
// *Cause: An UPDATE or INSERT statement attempted to insert a duplicate key.
// For Trusted Oracle configured in DBMS MAC mode, you may see
// this message if a duplicate entry exists at a different level.
// *Action: Either remove the unique restriction or do not insert the key. -
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> -
ORA-2002 : error while writing to audit trail
Hi all ,
I am oracle 11g and on SPARC OS.
I enabled audit in my database by setting the parameter audit_trail=DB and then i restarted my instance.
On doing so the database started but whenever i am trying to connect using pl/sql developer , i am getting the following list of errors :
ORA-00604 : error occured at recursive SQL level 1
ora-00904 : "DBID" invalid identifier
Ora-02002 : error while writing to audit trail
ORA-00604 : error occured at recursive SQL level 1
ora-00904 : "DBID" invalid identifier
I checked on the net for ora-02002 and increased the size of the system tablespace from 750 M to 1000M.
My system tablespace is dictionary managed.
bounced the database also , but still getting the same errors.
please help
regards
KKukreja
Edited by: ~JuniorDBA~ on Dec 20, 2010 8:59 PMHi Nicolas,
here is the output
SQL> desc sys.aud$
Name Null? Type
SESSIONID NOT NULL NUMBER
ENTRYID NOT NULL NUMBER
STATEMENT NOT NULL NUMBER
TIMESTAMP# DATE
USERID VARCHAR2(30)
USERHOST VARCHAR2(128)
TERMINAL VARCHAR2(255)
ACTION# NOT NULL NUMBER
RETURNCODE NOT NULL NUMBER
OBJ$CREATOR VARCHAR2(30)
OBJ$NAME VARCHAR2(128)
AUTH$PRIVILEGES VARCHAR2(16)
AUTH$GRANTEE VARCHAR2(30)
NEW$OWNER VARCHAR2(30)
NEW$NAME VARCHAR2(128)
SES$ACTIONS VARCHAR2(19)
SES$TID NUMBER
LOGOFF$LREAD NUMBER
LOGOFF$PREAD NUMBER
LOGOFF$LWRITE NUMBER
LOGOFF$DEAD NUMBER
LOGOFF$TIME DATE
COMMENT$TEXT VARCHAR2(4000)
CLIENTID VARCHAR2(64)
SPARE1 VARCHAR2(255)
SPARE2 NUMBER
OBJ$LABEL RAW(255)
SES$LABEL RAW(255)
PRIV$USED NUMBER
SESSIONCPU NUMBERsince i took over the database , no one did anything ... i only truncated the aud$ table today.
But while going through the files i came across a SQL file that had this content :
more move_audit.sql
create table system.aud$
tablespace AUD_TSP
as select * from aud$;
create index system.i_aud1 on system.aud$(sessionid, ses$tid);
rename aud$ to aud$_temp;
create view aud$ as
select * from system.aud$;
connect system/XXXXX
grant all on aud$ to sys with grant option;
grant delete on aud$ to delete_catalog_role;Now I am not sure what has happened and who has done what,but when i checked on TOAD, system tablespace had aud$ table and there was no table in tablespace AUD_TSP.
thanks and regards
Kkukreja
Edited by: ~JuniorDBA~ on Dec 21, 2010 12:55 AM -
ORA-30966: error detected in the XML Index layer
Dear all,
after upgrading from 9.2.0.8 to 11.2.0.1, Autoconfig ended with error:
Alert log file shows :
Mon Jul 04 21:33:50 2011
Errors in file /ebiz/oracle/diag/rdbms/vision/VISION/trace/VISION_ora_31642.trc (incident=16196):
+ORA-00600: internal error code, arguments: [kzxcInitLoadLocal-7], [64131], [ORA-64131: XMLIndex Metadata: failure during the looking up of the dictionary+
+ORA-30966: error detected in the XML Index layer+
+ORA-31011: XML parsing failed+
+ORA-01403: no data found+
+], [], [], [], [], [], [], [], [], []+
ORA-01403: no data found
Incident details in: /ebiz/oracle/diag/rdbms/vision/VISION/incident/incdir_16196/VISION_ora_31642_i16196.trc
Mon Jul 04 21:48:25 2011
Incremental checkpoint up to RBA [0x3b2.a445.0], current log tail at RBA [0x3b2.a447.0]
Mon Jul 04 21:49:25 2011
Errors in file /ebiz/oracle/diag/rdbms/vision/VISION/trace/VISION_ora_330.trc (incident=16206):
+ORA-00600: internal error code, arguments: [kzxcInitLoadLocal-7], [64131], [ORA-64131: XMLIndex Metadata: failure during the looking up of the dictionary+
+ORA-30966: error detected in the XML Index layer+
+ORA-31011: XML parsing failed+
for ORA-30966 i found one metalink document
Bug 9496480: XDB VIEWS INVALIDATED AFTER RUNNING CATUPGRD.SQL UPGRADING 9.2.0.8.0 TO 11.2.0.1I am not able to understand this bug detail, can some one help me to understand this BUG 9496480. Is it possible to run autoconfig ?RegardsHAMEEDThis the result shows that ORACLE REAL APPLICATION CLUSTERS status is "INVALID" but we dont have any RAC configuration.!!!
SQL> select COMP_NAME,VERSION,STATUS from dba_registry;
COMP_NAME VERSION STATUS
Oracle Database Catalog Views 11.2.0.1.0 VALID
Oracle Database Packages and Types 11.2.0.1.0 VALID
Oracle Real Application Clusters 11.2.0.1.0 INVALID
JServer JAVA Virtual Machine 11.2.0.1.0 VALID
Oracle XDK 11.2.0.1.0 VALID
Oracle Database Java Packages 11.2.0.1.0 VALID
Oracle Multimedia 11.2.0.1.0 VALID
Spatial 11.2.0.1.0 VALID
Oracle Text 11.2.0.1.0 VALID
OLAP Analytic Workspace 11.2.0.1.0 VALID
Oracle OLAP API 11.2.0.1.0 VALID
OLAP Catalog 11.2.0.1.0 VALID
Oracle Data Mining 11.2.0.1.0 VALID
Oracle XML Database 11.2.0.1.0 VALID
14 rows selected.Kindly let me know what is the otherway !
Regards
HAMEED -
ORA-306500 error when using EXEC_SQL? [SOLVED]
I used Francois Degrelle's example of doing a dynamic where clause to create a procedure using the EXEC_SQL package to get various counts from a table with different where clauses. Everything works for all the where clauses except when I try a date comparison I get the ORA-306500 error. The where clause I'm using takes 2 screen date fields:
'WHERE date_column BETWEEN ' || :date_field1 || ' AND ' || :date_field2
Anybody know what is causing this error?you forgot the to_date in the dynamic part.
what you pass to sql engine now is
where date_column between 10-FEB-2008 and 11-FEB-2008
don't think this would work...
what you need is:
where date_column between to_date('10-FEB-2008', 'DD-MON-RRRR') and .....
so you have to do some type conversions:
first of all convert in your form your date variable to a string with known format:
=> to_char(:date_field, 'DD-MON-RRRR')
now you have a string which looks like this:
'10-FEB-2008'
then let's go over to the dynamic part:
you want to restrict your where clause on date values, so when restricting with specific strings (the string from above), you have to convert it to a date datatype with to date.
so, this would look like this (as mentioned in my last post):
'.....between to_date(''''||to_char(:date_field1, 'dd-mon-rrrr')||''', ''dd-mon-rrrr'') and ..... '
best thing would be to display your query, and pass it in sqlplus as long it won't work ;-).
regards -
ORA-31011 : Weird case of parsing/validation failure...
Hello all,
It seems that when trying to insert into an XMLTYPE schema-bound column I am hitting a validation error that I cannot replicate with either XMLSpy os Stylus Studio.
Here follow the schemas that are used, and the offending XML :
envelope-consult.xsd
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="urn:publicid:-:DGTAXUD:GENERAL:ENVELOPE:1.0" xmlns:xml="http://www.w3.org/XML/1998/namespace" targetNamespace="urn:publicid:-:DGTAXUD:GENERAL:ENVELOPE:1.0" elementFormDefault="qualified" attributeFormDefault="unqualified" version="EORI-CONSULT-ENVELOPE-1.0">
<xs:annotation>
<xs:documentation>
This XML schema can be used by a national application to
validate consultation envelopes sent to the EORI
CDCO application. It can also be used to validate
consultation responses and acknowledgement envelopes
sent back by the EORI CDCO application. The number of
transactions in an envelope is 5.
For a request envelope, each transaction
contains a single app.message.
For a response envelope, each transaction contains
a single status element and a single app.message
element.
</xs:documentation>
</xs:annotation>
<xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd"/>
<xs:element name="envelope">
<xs:complexType>
<xs:sequence>
<xs:element name="header" type="Header" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="transaction" type="Transaction" maxOccurs="5"/>
</xs:sequence>
<xs:attribute name="id" type="xs:string" use="required"/>
<xs:attribute ref="xml:lang" default="en-GB"/>
</xs:complexType>
</xs:element>
<xs:complexType name="AppMessage">
<xs:sequence>
<xs:element ref="abstract.message"/>
</xs:sequence>
<xs:attribute name="id" type="xs:string" use="required"/>
</xs:complexType>
<xs:complexType name="Binary">
<xs:simpleContent>
<xs:extension base="xs:base64Binary">
<xs:attribute name="mime.type" type="xs:string" default="application/octet-stream"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="BusinessRef">
<xs:sequence>
<xs:element ref="abstract.ref"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="Header">
<xs:attribute name="name" type="xs:string" use="required"/>
<xs:attribute name="value" type="xs:string" use="required"/>
</xs:complexType>
<xs:complexType name="MMIMessageType">
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute ref="xml:lang" default="en-GB"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="Status">
<xs:sequence>
<xs:element name="mmi.message" type="MMIMessageType" minOccurs="0"/>
<xs:element name="status.detail" type="StatusDetail" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="category" type="StatusCategory" use="required"/>
<xs:attribute name="location" type="xs:string" use="required"/>
</xs:complexType>
<xs:simpleType name="StatusCategory">
<xs:restriction base="xs:string">
<xs:enumeration value="ok"/>
<xs:enumeration value="error"/>
<xs:enumeration value="rejected"/>
<xs:enumeration value="warning"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="StatusDetail">
<xs:sequence>
<xs:element name="business.ref" type="BusinessRef" minOccurs="0"/>
<xs:element name="binary" type="Binary" minOccurs="0"/>
<xs:element name="mmi.message" type="MMIMessageType" minOccurs="0"/>
</xs:sequence>
<xs:attribute name="category" type="StatusDetailCategory" use="required"/>
<xs:attribute name="location" type="xs:string" use="required"/>
<xs:attribute name="code" type="xs:NMTOKEN" use="required"/>
</xs:complexType>
<xs:simpleType name="StatusDetailCategory">
<xs:restriction base="xs:string">
<xs:enumeration value="error"/>
<xs:enumeration value="info"/>
<xs:enumeration value="warning"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="Transaction">
<xs:sequence>
<xs:element name="header" type="Header" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="status" type="Status" minOccurs="0"/>
<xs:element name="app.message" type="AppMessage"/>
</xs:sequence>
<xs:attribute name="id" type="xs:string" use="required"/>
</xs:complexType>
<xs:element name="abstract.message" abstract="true"/>
<xs:element name="abstract.ref" abstract="true"/>
</xs:schema>EORI-consult.xsd
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:envelope="urn:publicid:-:DGTAXUD:GENERAL:ENVELOPE:1.0" xmlns="urn:publicid:-:DGTAXUD:EORI:CONSULT:1.0" targetNamespace="urn:publicid:-:DGTAXUD:EORI:CONSULT:1.0" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.0">
<xs:annotation>
<xs:documentation>
This XML schema contains the definitions of data
elements and messages specific to the EORI consult
functionality.
</xs:documentation>
</xs:annotation>
<xs:import namespace="urn:publicid:-:DGTAXUD:GENERAL:ENVELOPE:1.0" schemaLocation="envelope-consult.xsd"/>
<xs:include schemaLocation="EORI-data.xsd"/>
<xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd"/>
<!-- Base types -->
<xs:simpleType name="Date">
<xs:annotation>
<xs:documentation>Date format</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:pattern value="\d{4}\d{2}\d{2}"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="EoriRecord">
<xs:sequence>
<xs:element name="eori.record.ref" type="EoriNumberRef"/>
<xs:element name="tc.number.list" type="TcNumberList"/>
<xs:element name="economic.operator.details" type="EconomicOperatorDetails"/>
<xs:element name="legal.status.list" type="LegalStatusPeriodList"/>
<xs:element name="establishment.address.list" type="EstablishmentAddressPeriodList"/>
<xs:element name="vat.list" type="VatList"/>
<xs:element name="contact.list" type="ContactPeriodList"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="EconomicOperatorDetails">
<xs:sequence>
<xs:element name="full.name" type="EOFullName"/>
<xs:element name="short.name" type="EOShortName"/>
<xs:element name="establishment.date" type="Date" minOccurs="0"/>
<xs:element name="person.type.code" type="TypePerson" minOccurs="0"/>
<xs:element name="economic.activity.code" type="ActivityCode" minOccurs="0"/>
<xs:element name="start.date" type="Date"/>
<xs:element name="expiry.date" type="Date" minOccurs="0"/>
<xs:element name="publication.ind" type="xs:boolean" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ValidityPeriod">
<xs:sequence>
<xs:element name="start.date" type="Date"/>
<xs:element name="end.date" type="Date" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ContactPeriod">
<xs:sequence>
<xs:element name="contact" type="Contact"/>
<xs:element name="validity.period" type="ValidityPeriod"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ContactPeriodList">
<xs:sequence>
<xs:element name="contact" type="ContactPeriod" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="EstablishmentAddressPeriod">
<xs:sequence>
<xs:element name="establishment.address" type="EstablishmentAddress"/>
<xs:element name="validity.period" type="ValidityPeriod"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="EstablishmentAddressPeriodList">
<xs:sequence>
<xs:element name="establishment.address" type="EstablishmentAddressPeriod" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="LegalStatusPeriod">
<xs:sequence>
<xs:element name="legal.status" type="LegalStatus"/>
<xs:element name="validity.period" type="ValidityPeriod"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="LegalStatusPeriodList">
<xs:sequence>
<xs:element name="legal.status" type="LegalStatusPeriod" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="EoriRecordFull">
<xs:complexContent>
<xs:extension base="EoriRecord">
<xs:sequence>
<xs:element name="aeo.certificate.lifecycle.list" type="AeoCertificateLifecycleList" minOccurs="0"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="AeoCertificateLifecycleList">
<xs:sequence>
<xs:element name="aeo.certificate.lifecycle" type="AeoCertificateLifecycle" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="AeoCertificateLifecycle">
<xs:sequence>
<xs:element name="start.date" type="Date"/>
<xs:element name="end.date" type="Date" minOccurs="0"/>
<xs:element name="aeo.certificate.ref" type="AeoCertificateNumber" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<!-- Consultation messages -->
<xs:element name="eori.record.snapshot.consultation.request" substitutionGroup="envelope:abstract.message">
<xs:complexType>
<xs:sequence>
<xs:element name="snapshot.request.list" type="EoriRecordSnapshotRequestList"/>
</xs:sequence>
<xs:attribute ref="xml:lang" default="en-GB"/>
</xs:complexType>
</xs:element>
<xs:element name="eori.record.full.consultation.request" substitutionGroup="envelope:abstract.message">
<xs:complexType>
<xs:sequence>
<xs:element name="full.request.list" type="EoriRecordFullRequestList"/>
</xs:sequence>
<xs:attribute ref="xml:lang" default="en-GB"/>
</xs:complexType>
</xs:element>
<xs:element name="eori.record.snapshot.consultation.response" substitutionGroup="envelope:abstract.message">
<xs:complexType>
<xs:sequence>
<xs:element name="snapshot.response.list" type="EoriRecordSnapshotResponseList"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="eori.record.full.consultation.response" substitutionGroup="envelope:abstract.message">
<xs:complexType>
<xs:sequence>
<xs:element name="full.response.list" type="EoriRecordFullResponseList"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<!-- Acknowledgement business references -->
<xs:element name="full.request" type="EoriRecordFullRequest" substitutionGroup="envelope:abstract.ref"/>
<xs:element name="snapshot.request" type="EoriRecordSnapshotRequest" substitutionGroup="envelope:abstract.ref"/>
<!-- Snapshot: Consultation messages -->
<xs:complexType name="SnapshotConsultationRequest">
<xs:sequence>
<xs:element name="snapshot.request.list" type="EoriRecordSnapshotRequestList"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="SnapshotConsultationResponse">
<xs:sequence>
<xs:element name="snapshot.response.list" type="EoriRecordSnapshotResponseList"/>
</xs:sequence>
</xs:complexType>
<!-- Full: Consultation messages -->
<xs:complexType name="FullConsultationRequest">
<xs:sequence>
<xs:element name="full.request.list" type="EoriRecordFullRequestList"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="FullConsultationResponse">
<xs:sequence>
<xs:element name="full.response.list" type="EoriRecordFullResponseList"/>
</xs:sequence>
</xs:complexType>
<!-- Snapshot: Message structures -->
<xs:complexType name="EoriRecordSnapshot">
<xs:sequence>
<xs:element name="eori.record.ref" type="EoriNumberRef"/>
<xs:element name="tc.number.list" type="TcNumberList" minOccurs="0"/>
<xs:element name="economic.operator.details" type="EconomicOperatorDetails"/>
<xs:element name="legal.status" type="LegalStatus" minOccurs="0"/>
<xs:element name="establishment.address" type="EstablishmentAddress"/>
<xs:element name="vat.list" type="VatList" minOccurs="0"/>
<xs:element name="contact" type="Contact" minOccurs="0"/>
<xs:element name="aeo.certificate.ref" type="AeoCertificateNumber" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="EoriRecordSnapshotRequestList">
<xs:sequence>
<xs:element name="snapshot.request" type="EoriRecordSnapshotRequest" maxOccurs="20"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="EoriRecordSnapshotRequest">
<xs:sequence>
<xs:element name="eori.record.ref" type="EoriNumberRef"/>
<xs:element name="applicable.date" type="Date"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="EoriRecordFullRequestList">
<xs:sequence>
<xs:element name="full.request" type="EoriRecordFullRequest" maxOccurs="20"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="EoriRecordFullRequest">
<xs:sequence>
<xs:element name="eori.record.ref" type="EoriNumberRef"/>
<xs:element name="consultation.purpose.code" type="ConsultationPurpose" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="EoriRecordSnapshotResponseList">
<xs:sequence>
<xs:element name="snapshot.response" type="EoriRecordSnapshotResponse" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="EoriRecordSnapshotResponse">
<xs:sequence>
<xs:element name="eori.record.snapshot" type="EoriRecordSnapshot"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="EoriRecordFullResponseList">
<xs:sequence>
<xs:element name="full.response" type="EoriRecordFullResponse" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="EoriRecordFullResponse">
<xs:sequence>
<xs:element name="eori.record.full" type="EoriRecordFull"/>
</xs:sequence>
</xs:complexType>
</xs:schema>EORI-data.xsd
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.0">
<xs:annotation>
<xs:documentation>
This XML schema contains the definitions of data
elements common to the messages exchanged in the
EORI download, upload and consultation
functionalities.
</xs:documentation>
</xs:annotation>
<!-- List types -->
<xs:complexType name="CountryList">
<xs:sequence>
<xs:element name="country" type="Country" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="LegalStatusList">
<xs:sequence>
<xs:element name="legal.status" type="LegalStatus" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="TcNumberList">
<xs:sequence>
<xs:element name="tc.number" type="TcNumberRef" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="VatList">
<xs:sequence>
<xs:element name="vat" type="Vat" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="CertificateInfoList">
<xs:sequence>
<xs:element name="certificate.info" type="CertificateInfo" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ApplicationInfoList">
<xs:sequence>
<xs:element name="application.info" type="ApplicationInfo" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<!-- Complex types -->
<xs:complexType name="CertificateInfo">
<xs:sequence>
<xs:element name="aeo.certificate.ref" type="AeoCertificateNumber"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ApplicationInfo">
<xs:sequence>
<xs:element name="aeo.application.ref" type="AeoApplicationNumber"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="AeoCertificateNumber">
<xs:sequence>
<xs:element name="country.code" type="CountryCode"/>
<xs:element name="aeo.certificate.type.code" type="AeoCertificateTypeCode"/>
<xs:element name="national.number" type="NationalAuthorisationNumber"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="AeoApplicationNumber">
<xs:sequence>
<xs:element name="country.code" type="CountryCode"/>
<xs:element name="national.number" type="ApplicationNumber"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="Contact">
<xs:sequence>
<xs:element name="phone" type="PhoneNumber" minOccurs="0"/>
<xs:element name="fax" type="PhoneNumber" minOccurs="0"/>
<xs:element name="email" type="Email" minOccurs="0"/>
<xs:element name="name.address" type="NameAddress"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="Country">
<xs:choice>
<xs:element name="country.code" type="CountryCode"/>
<xs:element name="country.name" type="CountryName"/>
</xs:choice>
</xs:complexType>
<xs:complexType name="EoriNumberRef">
<xs:sequence>
<xs:element name="country.code" type="CountryCode"/>
<xs:element name="national.number" type="EoNationalNumber"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="TcNumberRef">
<xs:sequence>
<xs:element name="country" type="Country"/>
<xs:element name="national.number" type="TcNationalNumber"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="EstablishmentAddress">
<xs:sequence>
<xs:element name="language.code" type="LanguageCode"/>
<xs:element name="name" type="Name" minOccurs="0"/>
<xs:element name="street" type="Street"/>
<xs:element name="postcode" type="Postcode" minOccurs="0"/>
<xs:element name="city" type="City"/>
<xs:element name="country" type="Country"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="LegalStatus">
<xs:sequence>
<xs:element name="language.code" type="LanguageCode"/>
<xs:element name="legal.status.description" type="LegalStatusDescription"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="NameAddress">
<xs:sequence>
<xs:element name="language.code" type="LanguageCode"/>
<xs:element name="full.name" type="FullName"/>
<xs:element name="short.name" type="Name" minOccurs="0"/>
<xs:element name="street" type="Street"/>
<xs:element name="postcode" type="Postcode" minOccurs="0"/>
<xs:element name="city" type="City"/>
<xs:element name="country" type="Country"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="Vat">
<xs:sequence>
<xs:element name="country.code" type="CountryCode"/>
<xs:element name="number" type="VATNationalNumber"/>
</xs:sequence>
</xs:complexType>
<!-- Simple types -->
<xs:simpleType name="Accepted">
<xs:restriction base="xs:int">
<xs:pattern value="0|1"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ActivityCode">
<xs:restriction base="SingleLineString">
<xs:length value="4"/>
<xs:pattern value="[0-9]+"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="NationalAuthorisationNumber">
<xs:restriction base="SingleLineString">
<xs:minLength value="1"/>
<xs:maxLength value="29"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="AeoCertificateTypeCode">
<xs:restriction base="SingleLineString">
<xs:length value="4"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ApplicationNumber">
<xs:restriction base="SingleLineString">
<xs:minLength value="1"/>
<xs:maxLength value="29"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="City">
<xs:restriction base="SingleLineString">
<xs:minLength value="1"/>
<xs:maxLength value="35"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ConsultationPurpose">
<xs:restriction base="xs:string">
<xs:length value="1"/>
<xs:enumeration value="C"/>
<xs:enumeration value="Q"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="CountryCode">
<xs:annotation>
<xs:documentation>
Country code format
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:pattern value="[A-Z][A-Z]"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="CountryName">
<xs:annotation>
<xs:documentation>Country name</xs:documentation>
</xs:annotation>
<xs:restriction base="SingleLineString">
<xs:minLength value="1"/>
<xs:maxLength value="30"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Email">
<xs:restriction base="SingleLineString">
<xs:minLength value="1"/>
<xs:maxLength value="70"/>
<xs:pattern value="\p{IsBasicLatin}+"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="EoNationalNumber">
<xs:restriction base="SingleLineString">
<xs:minLength value="1"/>
<xs:maxLength value="15"/>
<xs:pattern value="\p{IsBasicLatin}+"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="TcNationalNumber">
<xs:restriction base="SingleLineString">
<xs:minLength value="1"/>
<xs:maxLength value="15"/>
<xs:pattern value="\p{IsBasicLatin}+"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="LanguageCode">
<xs:annotation>
<xs:documentation>
Language code format
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:pattern value="[a-z][a-z]"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="LegalStatusDescription">
<xs:annotation>
<xs:documentation>
Legal status value
</xs:documentation>
</xs:annotation>
<xs:restriction base="SingleLineString">
<xs:minLength value="1"/>
<xs:maxLength value="50"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="EOFullName">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="300"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="EOShortName">
<xs:restriction base="SingleLineString">
<xs:minLength value="1"/>
<xs:maxLength value="35"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="PhoneNumber">
<xs:restriction base="SingleLineString">
<xs:minLength value="2"/>
<xs:maxLength value="35"/>
<xs:pattern value="\+\p{IsBasicLatin}+"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Postcode">
<xs:restriction base="SingleLineString">
<xs:minLength value="1"/>
<xs:maxLength value="9"/>
<xs:pattern value="\p{IsBasicLatin}+"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="SingleLineString">
<xs:annotation>
<xs:documentation>
Single line string: Avoid presence of \n (new
line) and \r (return) characters in the string.
Note that pattern ".*" is equivalent.
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:pattern value="[^\n\r]*"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="FullName">
<xs:restriction base="SingleLineString">
<xs:minLength value="1"/>
<xs:maxLength value="100"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Name">
<xs:restriction base="SingleLineString">
<xs:minLength value="1"/>
<xs:maxLength value="35"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Street">
<xs:restriction base="SingleLineString">
<xs:minLength value="1"/>
<xs:maxLength value="35"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="TypePerson">
<xs:annotation>
<xs:documentation>
Type of person values as follows: 1-Natural
person, 2-Legal person and 3-Association of
persons. Values can be updated and retrieved by the CS/RD.
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:unsignedInt">
<xs:totalDigits value="1"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="VATNationalNumber">
<xs:restriction base="SingleLineString">
<xs:minLength value="1"/>
<xs:maxLength value="15"/>
<xs:pattern value="\p{IsBasicLatin}+"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>xml.xsd
<?xml version='1.0'?>
<xs:schema targetNamespace="http://www.w3.org/XML/1998/namespace" xmlns:xs="http://www.w3.org/2001/XMLSchema" xml:lang="en">
<xs:attribute name="lang" type="xs:language"/>
<xs:attribute name="space" default="preserve">
<xs:simpleType>
<xs:restriction base="xs:NCName">
<xs:enumeration value="default"/>
<xs:enumeration value="preserve"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="base" type="xs:anyURI"/>
<xs:attributeGroup name="specialAttrs">
<xs:attribute ref="xml:base"/>
<xs:attribute ref="xml:lang"/>
<xs:attribute ref="xml:space"/>
</xs:attributeGroup>
</xs:schema>(second part follows...)(continuing from above post ...)
TestXML.xml
<?xml version="1.0" encoding="utf-8"?>
<env:envelope id="5555" xmlns="urn:publicid:-:DGTAXUD:EORI:CONSULT:1.0" xmlns:env="urn:publicid:-:DGTAXUD:GENERAL:ENVELOPE:1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<env:header name="Version" value="1.0"/>
<env:header name="From" value="EOS-CDCO"/>
<env:header name="Originator" value="BE-EORI"/>
<env:header name="InReplyTo" value="5554"/>
<env:transaction id="1">
<env:header name="InReplyTo" value="1"/>
<env:status category="ok" location="/envelope[@id='5554']/transaction[@id='1']">
<env:status.detail category="info" code="100" location="/envelope[@id='5554']/transaction[@id='1']/app.message[@id='1']">
<env:business.ref>
<full.request>
<eori.record.ref>
<country.code>BE</country.code>
<national.number>123</national.number>
</eori.record.ref>
<consultation.purpose.code>C</consultation.purpose.code>
</full.request>
</env:business.ref>
<env:mmi.message>Ok</env:mmi.message>
</env:status.detail>
</env:status>
<env:app.message id="1">
<eori.record.full.consultation.response>
<full.response.list>
<full.response>
<eori.record.full>
<eori.record.ref>
<country.code>FR</country.code>
<national.number>123</national.number>
</eori.record.ref>
<tc.number.list>
<tc.number>
<country>
<country.code>AA</country.code>
</country>
<national.number>465466</national.number>
</tc.number>
</tc.number.list>
<economic.operator.details>
<full.name>a</full.name>
<short.name>a</short.name>
<establishment.date>19670813</establishment.date>
<person.type.code>1</person.type.code>
<economic.activity.code>1234</economic.activity.code>
<start.date>19670813</start.date>
<expiry.date>19670813</expiry.date>
<publication.ind>0</publication.ind>
</economic.operator.details>
<legal.status.list>
<legal.status>
<legal.status>
<language.code>aa</language.code>
<legal.status.description>status</legal.status.description>
</legal.status>
<validity.period>
<start.date>19670813</start.date>
<end.date>19670813</end.date>
</validity.period>
</legal.status>
</legal.status.list>
<establishment.address.list>
<establishment.address>
<establishment.address>
<language.code>aa</language.code>
<name>a</name>
<street>s</street>
<postcode>p</postcode>
<city>c</city>
<country>
<country.code>AA</country.code>
</country>
</establishment.address>
<validity.period>
<start.date>19670813</start.date>
<end.date>19670813</end.date>
</validity.period>
</establishment.address>
</establishment.address.list>
<vat.list>
<vat>
<country.code>AA</country.code>
<number>74455</number>
</vat>
</vat.list>
<contact.list>
<contact>
<contact>
<phone>+ 123</phone>
<fax>+ 123</fax>
<name.address>
<language.code>aa</language.code>
<full.name>a</full.name>
<short.name>a</short.name>
<street>s</street>
<postcode>p</postcode>
<city>c</city>
<country>
<country.code>AA</country.code>
</country>
</name.address>
</contact>
<validity.period>
<start.date>19670813</start.date>
<end.date>19670813</end.date>
</validity.period>
</contact>
</contact.list>
<aeo.certificate.lifecycle.list>
<aeo.certificate.lifecycle>
<start.date>19670813</start.date>
<end.date>19670813</end.date>
</aeo.certificate.lifecycle>
</aeo.certificate.lifecycle.list>
</eori.record.full>
</full.response>
</full.response.list>
</eori.record.full.consultation.response>
</env:app.message>
</env:transaction>
</env:envelope>Here is the script that created the table and registered the schemas
BEGIN
DBMS_XMLSCHEMA.REGISTERSCHEMA(
SCHEMAURL => 'envelope-consult.xsd',
SCHEMADOC => XDBURITYPE('/public/xsdfiles/EORI/envelope-consult.xsd').getBlob(),
LOCAL => TRUE,
GENTYPES => FALSE,
GENBEAN => FALSE,
GENTABLES => FALSE,
FORCE => FALSE,
CSID => NLS_CHARSET_ID('AL32UTF8'),
OPTIONS => DBMS_XMLSCHEMA.REGISTER_BINARYXML);
END;
BEGIN
DBMS_XMLSCHEMA.REGISTERSCHEMA(
SCHEMAURL => 'EORI-consult.xsd',
SCHEMADOC => XDBURITYPE('/public/xsdfiles/EORI/EORI-consult.xsd').getBlob(),
LOCAL => TRUE,
GENTYPES => FALSE,
GENBEAN => FALSE,
GENTABLES => FALSE,
FORCE => FALSE,
CSID => NLS_CHARSET_ID('AL32UTF8'),
OPTIONS => DBMS_XMLSCHEMA.REGISTER_BINARYXML);
END;
CREATE TABLE TEST_XML_TABLE
ENV_CONSULT SYS.XMLTYPE,
MSG_TSTAMP TIMESTAMP(6) WITH TIME ZONE DEFAULT SYSTIMESTAMP NOT NULL
XMLTYPE COLUMN ENV_CONSULT STORE AS SECUREFILE BINARY XML
( TABLESPACE PARTYMS10_DATA
INDEX(TABLESPACE PARTYMS10_INDEX)
XMLSCHEMA "envelope-consult.xsd" ELEMENT "envelope"
DISALLOW NONSCHEMA
TABLESPACE PARTYMS10_DATA
LOGGING
NOCOMPRESS
NOCACHE
NOPARALLEL
MONITORING
/And here is the offending statement, together with the reported error
INSERT
INTO TEST_XML_TABLE
VALUES (XDBURITYPE('/public/xmlfiles/EORI/TestXML.xml').getXML(), SYSTIMESTAMP)
COMMIT
ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LSX-00213: only 0 occurrences of particle "abstract.ref", minimum is 1
Details:
INSERT
INTO TEST_XML_TABLE
VALUES (XDBURITYPE('/public/xmlfiles/EORI/TestXML.xml').getXML(), SYSTIMESTAMP)
Error at line 1
ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LSX-00213: only 0 occurrences of particle "abstract.ref", minimum is 1I am using 11.1.0.7.0, as seen on
select * from v$version;
BANNER
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
PL/SQL Release 11.1.0.7.0 - Production
CORE 11.1.0.7.0 Production
TNS for 32-bit Windows: Version 11.1.0.7.0 - Production
NLSRTL Version 11.1.0.7.0 - Production
5 rows selected.Any ideas ? I cannot understand it at all... It seems to relate to the substitutionGroup entries in general, but I can't for the life of me see why :(
Best Regards
Philip
Maybe you are looking for
-
How to register a pl/sql report as an Oracle report.
Guru's, I have a requirement to add a Pl/sql report in a shipping document set. Shipping document set can contain Oracle reports only(RDF). Is there a way we can add pl/sql report in a shipping docuemnt set? Thanks -Karthik
-
I cannot connect to wifi using my MacBook, my phone and Xbox work but there is no prompt for the WPA password and when I go to the diagnostics page it prompts me to choose a certificate or enter an account name and password? What account name are the
-
Backup jobs and password changing problem
Hi I have created few rman job in my db (11.2) to backup database. I my company i have to change all system passwords (os - oracle, system, syman, etc...) every 90 days. When i changing password for user who created backup jobs, this jobs stop workin
-
Maximum Number of Simultaneous Accounts?
Is there a maximum number of accounts I can have running at the same time? I have fast user switching turned on and would like to run up to 10 accounts at a time.
-
Sequence of items in delivery via BAPI_OUTB_DELIVERY_CREATE_STO
Hi all, Is there a way to control the sequence order of items in delivery that is created via BAPI_OUTB_DELIVERY_CREATE_STO. For example, I have to STOs, 4600001440, 4600001635, each of them have 2 items, that are 10 and 20, thus I want the result o