XML SCHEMA registration for XML TYPE (storing XML files in Oracle 10g)
I have created the XML Schema for the XML file stored in Oracle 10g and also added this Schema into the database. I have related that schema with the column in the table which contains the XML file. When i execute the query to fetch the data from the stored file i am getting a blank resultset. Is registering the XML Schema is necessary, if yes then please let me know the process of doing it. I have tried following steps to register Schema, but it is not working
Step1:
DECLARE
v_return BOOLEAN;
BEGIN
v_return := dbms_xdb.createFolder('/home/');
v_return := dbms_xdb.createFolder('/home/DEV/');
v_return := dbms_xdb.createFolder('/home/DEV/xsd/');
v_return := dbms_xdb.createFolder('/home/DEV/messages/');
v_return := dbms_xdb.createFolder('/home/DEV/employees/');
COMMIT;
END;
STEP 2:
Connecting To XML DB
Step3:
Register XML schema
I am failing to execute step number 2 and hence not able to register the schema also.
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by sudeepk:
If a java exception is thrown probably during ur install u might have forgotten
grant javauserpriv to scott;
grant javasyspriv to scott;
Thanks
[email protected]
<HR></BLOCKQUOTE>
Thank you!!!
Similar Messages
-
Is there an easy way to get the xml schema/DTD for a custom entity, specifically an .XSD file for that entity (which will then be used to create a map to be able to transform the fields of the entity to a 3rd-party message format)?
So have a custom entity with lots and lots of fields. Each of the fields will map to a differently named field to match the schema of the 3rd party entity. A very common situation. Looking to use a tool like the Biztalk mapper or Altova's MapForce to generate
an .xslt file to transform the downloaded entity (service.Retrieve with all columns) to the new format. (Will implement a typical VETR pattern.)
Apparently with CRM 4 there was a call that provided this, but from 2011 has not been available. Working with a crm 2015 system.That will give a descriptor of the table and allow creation of an .XSD file, but it's really complex in terms of types, and the there's type conversion. It might be an easy way to get a schema, with the downside being it's hard to use that schema.
It seems easier to do a fetch of the record with all fields filled in using service.Retrieve, and then converting this to xml, using Microsoft's guidance leads to using https://msdn.microsoft.com/en-us/library/hh675409.aspx which will serialize the entity
into XML with all the fields converted to type string, and with complex fields likewise converted to strings with additional information about the type.
Using this it's possible using an number of tools to create an easier to use .XSD file.
However, it would seem most integrations of this type are using 3rd party CRM connectors. Perhaps this is why Microsoft hasn't provided anything direct (and took away what they did have in crm4.0 due to it generating a hard to use .XSD or due to letting
their partners continue income streams from selling connectors").
But without using 3rd party connectors, or following the still tedious method of generating .XSD (a useable .xsd), have not yet come up with an easy, automatic way to get an .XSD or to easily integrate with 3rd party message format. -
Problem with running sample code from XML Schema Processor for Java
Hi there,
I downloaded the XML Schema Processor for Java and tried it out. Unfortunately, it failed at the first step. FYI, I included all xmlparserv2.jar and xmlschema.jar in my classpath.
I compiled XSDSample.java with a warning: XSDSample.java uses a deprecated API. Recompile with "-deprecation" for details. There was no problem with compiling XSDSetSchema.java.
When I tried to run report.xml by typing java XSDSample report.xml, I got Parsing report.xml
NonParserException: null.
I guess that report.xml from the sample is not valid.
Could any one give me a hint? Any suggestion would be greatly appreciated.
---Denali
nullPlease post this message at:
Forums Home » Oracle Technology Network (OTN) » Products » Database » XML DB -
Error downloading XML schema processor for java from OTN
I'm getting error downloading this product from otn site. http://technet.oracle.com/tech/xml/schema_java/index.htm
I login to OTN, go to this site, enter registration information and then I get the following error when I try to submit my info.
Runtime error occured. Do you wish to debug?
Line: 20
Error :'e_mail_valid' is undefined.
When I say 'No' for debug, it takes me to 'XML parser for java' download page instead of 'XML Schema processor'.
please help.
thankx
nullThe 'e_mail_valid' is undefined" has to do with the format of or lack of the email address. The routing problem is ours and should be fixed later today or by tomorrow morning.
Thanks,
Oracle XML Team -
XML Schemas: Regex for empty string?
Hi Folks,
It appears that the new Oracle schema processor has a bug in processing regular expressions.
Example. Create a regular expression which allows a string of characters 5-10 characters in length, or empty.
Here's the regex:
[a-zA-Z]{5-10}|()
When I use this in a pattern facet and in my instance document create an empty element for this type it gives me an error message (sorry, I don't recall the exact message).
/RogerRoger, empty expr is illegal in current implementation. We will add this support in next release.
Thanks,
Oracle XML develop team -
XML schema Registration ??
Hello,
Our environment is
SQL*Plus: Release 9.2.0.4.0
Oracle9i Enterprise Edition Release 9.2.0.4.0
OS Windows 2000
We registered XML schema in XML DB.
oraxdb:schemaURL="PORR_MT030001Fatalities"
<xsd:element name="BiologicsSafetyCase" type="PORR_MT030001.BiologicsSafetyCase" oraxdb:propNumber="271050" oraxdb:global="true" oraxdb:SQLName="BiologicsSafetyCase" oraxdb:SQLType="PORR_MT030001.Biologics1829_T" oraxdb:SQLSchema="HL7_KSMITH" oraxdb:memType="258" oraxdb:defaultTable="BiologicsSafetyCase1840_TAB" oraxdb:defaultTableSchema="HL7_KSMITH"/>
When we query user_xml_tables. It shows following.
SELECT "SYS"."USER_XML_TABLES"."TABLE_NAME" as "TABLE_NAME",
"SYS"."USER_XML_TABLES"."XMLSCHEMA" as "XMLSCHEMA",
"SYS"."USER_XML_TABLES"."ELEMENT_NAME" as "ELEMENT_NAME"
FROM "SYS"."USER_XML_TABLES"
WHERE ( "XMLSCHEMA" LIKE '%Fata%')
TABLE_NAME XMLSCHEMA ELEMENT_NAME
support1807_TAB PORR_MT030001Fatalities support
BiologicsSafetyCase1840_TAB PORR_MT030001Fatalities BiologicsSafetyCase
XXIfTRALI681800_TAB PORR_MT030001Fatalities XXIfTRALI68
location1587_TAB PORR_MT030001Fatalities location
XXEventDescription81799_TAB PORR_MT030001Fatalities XXEventDescription8
manufacturingProcess1793_TAB PORR_MT030001Fatalities manufacturingProcess
partOrganization1611_TAB PORR_MT030001Fatalities partOrganization
organization1616_TAB PORR_MT030001Fatalities organization
locatedPlace1583_TAB PORR_MT030001Fatalities locatedPlace
causedRecipientReacti1798_TAB PORR_MT030001Fatalities causedRecipientReaction
It shows additional O-R tables against different elements.
Is it normal?
How does these tables links with main table oraxdb:defaultTable="BiologicsSafetyCase1840_TAB" shows in registered schema header?
Do we able to segment this schema ?
Let me know your thought.
Thanks in advance.
RamHello,
Our environment is
SQL*Plus: Release 9.2.0.4.0
Oracle9i Enterprise Edition Release 9.2.0.4.0
OS Windows 2000
We registered XML schema in XML DB.
oraxdb:schemaURL="PORR_MT030001Fatalities"
<xsd:element name="BiologicsSafetyCase" type="PORR_MT030001.BiologicsSafetyCase" oraxdb:propNumber="271050" oraxdb:global="true" oraxdb:SQLName="BiologicsSafetyCase" oraxdb:SQLType="PORR_MT030001.Biologics1829_T" oraxdb:SQLSchema="HL7_KSMITH" oraxdb:memType="258" oraxdb:defaultTable="BiologicsSafetyCase1840_TAB" oraxdb:defaultTableSchema="HL7_KSMITH"/>
When we query user_xml_tables. It shows following.
SELECT "SYS"."USER_XML_TABLES"."TABLE_NAME" as "TABLE_NAME",
"SYS"."USER_XML_TABLES"."XMLSCHEMA" as "XMLSCHEMA",
"SYS"."USER_XML_TABLES"."ELEMENT_NAME" as "ELEMENT_NAME"
FROM "SYS"."USER_XML_TABLES"
WHERE ( "XMLSCHEMA" LIKE '%Fata%')
TABLE_NAME XMLSCHEMA ELEMENT_NAME
support1807_TAB PORR_MT030001Fatalities support
BiologicsSafetyCase1840_TAB PORR_MT030001Fatalities BiologicsSafetyCase
XXIfTRALI681800_TAB PORR_MT030001Fatalities XXIfTRALI68
location1587_TAB PORR_MT030001Fatalities location
XXEventDescription81799_TAB PORR_MT030001Fatalities XXEventDescription8
manufacturingProcess1793_TAB PORR_MT030001Fatalities manufacturingProcess
partOrganization1611_TAB PORR_MT030001Fatalities partOrganization
organization1616_TAB PORR_MT030001Fatalities organization
locatedPlace1583_TAB PORR_MT030001Fatalities locatedPlace
causedRecipientReacti1798_TAB PORR_MT030001Fatalities causedRecipientReaction
It shows additional O-R tables against different elements.
Is it normal?
How does these tables links with main table oraxdb:defaultTable="BiologicsSafetyCase1840_TAB" shows in registered schema header?
Do we able to segment this schema ?
Let me know your thought.
Thanks in advance.
Ram -
Xml schema not working in excel 2010 - xml corrupt
I originally posted this thread in Microsoft Answers but was suggested to post here...
I upgraded from xl2003 to xl2010. I'm trying to map xml schemas to xl2010 (using the source pane just as I did for xl2003) and the mapping works fine until I save the file and reopen it. Once I reopen the file and try accessing the map through the XML source
pane, I get an error identifying the xml map is corrupt as follows:
"The operation cannot be completed because the XML map is corrupt
To fix this problem, remove the associated xml map from the workbook and then add the XML map back to the workbook.
/schecma/element[1][@name = 'returnData']/complextype[1]/complexContent[1]/extension[1]Undefined <complexType>, '{http://www.....' is used as a base type."
I've tried this in xl2007 and it works fine. I also read some blogs about xl2010 xml features and in some I found that this new version has enhanced security xml features.
Any help would be appreciated.
"innovation is the key to success"Interesting to note this is still a problem, but even more interesting is as to why Excel works fine the first time you bring in the xsd, but not after you save it. I found information that says it's related to resolving externally referenced xsds,
which is fine, but again, why does it work the first ime and not the second? If it were a problem with external xsds then it should never work at all so I think that answer is bogus.
Something has to be getting corrupted on the save and it's not important enough to MS to spend the time to fix it. -
Now that XML Schema is a Recommendation, ETA on XML Schema Processor?
Now that XML Schema is a Recommendation, when can we expect a non-beta release of the XML Schema Processor?
XML Schema processor will be updated to REC in next release.
-
Load XML file to Oracle 10G XE
The load xml wizard in Oracle XE asks for a table in the HR schema to load into.
Well I create one using the 'Create Table' procedure with a script that runs and creates the table. Now I have a XML file that matches the table I created and try to load the file contents into the table. I get an error. Am I surprised? no, I am not. Nothing works the first time.
Is there a preferred format for the xml file that supports loading into a table?
There appears to be no help file, but then I may be mistaken.
Could someone show me where to find this help file?The bug you are referencing occurs when an Enumerated Value also has min and max lengths specified..
Eg something like
<xsd:simpleType name="EnumType">
<xsd:annotation>
<xsd:documentation>ENUM_TYPE</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="AA"/>
<xsd:enumeration value="AB"/>
<xsd:enumeration value="AE"/>
<xsd:enumeration value="AK"/>
<xsd:enumeration value="AL"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="TYPE1">
<xsd:sequence>
<xsd:element name="TYPE11">
<xsd:simpleType>
<xsd:restriction base="EnumType">
<xsd:minLength value="1"/>
<xsd:maxLength value="10"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:schema> Do you have something like this in your XML Schema. If this is the case try removing the minLength, maxLength as they are redundant, which is probably why we didn't catch this one in internal testing, it sort of falls into the "if it hurts please don't do it" category :). Also the fix for this bug appears to have been backported on top of 9.2.0.6.0 so upgrading to 9.2.0.7.0 or 9.2.0.8.0 or the later releases of 10.1 or 10.2 should fix the problem. -
Reading XML File in Oracle 10g
Can anybody tell me How to Read an XML file into Oracle Table and update the Records.
Please guide me.http://www.oracle.com/technology/sample_code/tech/java/codesnippet/xmldb/HowToLoadLargeXML.html
or else straighter way, go here:
XML DB
Edited by: Ora on Feb 16, 2011 1:32 AM -
Hibernate for lower case data(case sensitive) in oracle 10G
Hi,
I generated my data (oracle 10G release 2) using lowercase data types and table names. This requires queries in the strict form of -
Select "Column_Name" from "Table_name";
But Hibernate makes the queries as -
Select Column_Name from Table_Name;
driver I am using is oracle.jdbc.driver.OracleDriver
Jar is ojdbc14
and dialect is org.hibernate.dialect.Oracle9Dialect
The problem is:
table or view does not exist.
as it(lower case data) does not recognize the hibernate query format.
Can anyone suggest the proper driver and Jar to overcome the problem.
Regards,
AnkitAnkit,
Just bite the bullet and don't use case-sensitive identifiers :-)
I don't use "hibernate", but maybe you can add the double-quotes -- " -- in the XML file?
I don't think there's a JDBC driver that adds the double-quotes for you. So I think your only option (if you insist on using case-sensistive identifiers) is to explore possibilities through "hibernate" itself.
I also don't think there's any database setting that allows Oracle to accept case-sensitive identifiers.
Good Luck,
Avi. -
Problem storing Russian Characters in Oracle 10g
We are facing an issue in one of our sites which is in Russian Language. Whenever data is submitted with Russian Characters it saves it as Question mark(upside down) in the database. Database is not supporting these characters.The character encoding is done in UTF-8 format from the front end.
This code use to work fine with Oracle 9i database but after the upgradation to Oracle 10g this problem has started occuring. We have not made any changes to the code after the upgradation of the database.
How can we resolve this and what are the settings that we can do to make this work fine?What is your database character set and national character set?
SELECT *
FROM v$nls_parameters
WHERE parameter like '%CHARACTERSET';Are you storing the data in CHAR/ VARCHAR2/ CLOB columns? Or NCHAR/ NVARCHAR2/ NCLOB?
Justin -
Is there replacement for (less than) and (greater than) in Oracle 10g?
Hi,
In the User Java Application using Oracle's > (less than) or > (greater than) is not working.
Can anyone help me onthis for any feature in Oracle 10g instead of using less than or greater than
Thanks and RegardsHi,
What do yyou mean by "it's not working"?
Maybe you could use sign function, instead.
with t as (select 2 x, 3 y from dual union all
select 2 x, 1 y from dual union all
select 2 x, 2 y from dual)
select t.*
from t
where sign(y - x) = - 1;
X Y
2 1
1 row selected.Regards
Peter -
Schema registration for storing XML documents in XMLDB repository
Hi,
Can I store only the XMLSchema based documents in the XMLDB repository?.Cant I save documnts which do not have a schema?.
Thanks in advance,
Sirisha.Testing with 10.1.0.3.0 I get
SQL*Plus: Release 10.1.0.3.0 - Production on Thu Sep 16 23:53:30 2004
Copyright (c) 1982, 2004, Oracle. All rights reserved.
SQL> spool registerSchema_&4..log
SQL> set trimspool on
SQL> connect &1/&2
Connected.
SQL> --
SQL> declare
2 result boolean;
3 begin
4 result := dbms_xdb.createResource('/home/&1/xsd/&4',
5 bfilename(USER,'&4'),nls_charset_id('AL32UTF8'));
6 end;
7 /
old 4: result := dbms_xdb.createResource('/home/&1/xsd/&4',
new 4: result := dbms_xdb.createResource('/home/OTNTEST/xsd/pdbx.xsd',
old 5: bfilename(USER,'&4'),nls_charset_id('AL32UTF8'));
new 5: bfilename(USER,'pdbx.xsd'),nls_charset_id('AL32UTF8'));
PL/SQL procedure successfully completed.
SQL> commit
2 /
Commit complete.
SQL> alter session set events='31098 trace name context forever'
2 /
Session altered.
SQL> begin
2 dbms_xmlschema.registerSchema
3 (
4 schemaURL => '&3',
5 schemaDoc => xdbURIType('/home/&1/xsd/&4').getClob(),
6 local => TRUE,
7 genTypes => TRUE,
8 genBean => FALSE,
9 genTables => &5
10 );
11 end;
12 /
old 4: schemaURL => '&3',
new 4: schemaURL => 'pdbx.xsd',
old 5: schemaDoc => xdbURIType('/home/&1/xsd/&4').getClob(),
new 5: schemaDoc => xdbURIType('/home/OTNTEST/xsd/pdbx.xsd').getClob(),
old 9: genTables => &5
new 9: genTables => TRUE
begin
ERROR at line 1:
ORA-31084: error while creating table "OTNTEST"."datablock1708_TAB" for element
"datablock"
ORA-01792: maximum number of columns in a table or view is 1000
ORA-02310: exceeded maximum number of allowable columns in table
ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 17
ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 26
ORA-06512: at line 2
SQL> quit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.1.0.3.0 - Production
With the Partitioning, OLAP and Data Mining options
$
This issue is dealt with in
http://download-west.oracle.com/docs/cd/B13789_01/appdev.101/b10790/xdb03usg.htm#sthref181
See the section working with large XML Schemas -
We installed XMLDB on Oracle Server Enterprise Edition 9.2.0.3 (AIX 4.3 version).
The status from DBA_REGISTRY for Oracle XML DB is VALID.
When trying to register schema, we get following error:
ERROR at line 1:
ORA-01031: insufficient privileges
ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 0
ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 12
ORA-06512: at line 35
Here are the steps:
1. Connect as SYS
2. grant xdbadmin to wb_interface;
3. connect as wb_interface;
4. Try to register schema as follows
declare
doc varchar2(1000) := '<schema
targetNamespace="http://www.oracle.com/PO.xsd"
xmlns:po="http://www.oracle.com/PO.xsd"
xmlns="http://www.w3.org/2001/XMLSchema">
<complexType name="PurchaseOrderType">
<sequence>
<element name="PONum" type="decimal"/>
<element name="Company">
<simpleType>
<restriction base="string">
<maxLength value="100"/>
</restriction>
</simpleType>
</element>
<element name="Item" maxOccurs="1000">
<complexType>
<sequence>
<element name="Part">
<simpleType>
<restriction base="string">
<maxLength value="1000"/>
</restriction>
</simpleType>
</element>
<element name="Price" type="float"/>
</sequence>
</complexType>
</element>
</sequence>
</complexType>
<element name="PurchaseOrder" type="po:PurchaseOrderType"/>
</schema>';
begin
dbms_xmlschema.registerSchema('http://www.oracle.com/PO.xsd', doc);
end;
Please Help!!!check if the user already has the following privileges.
CREATE SESSION
CREATE TABLE
CREATE TRIGGER
CREATE TYPE
ALTER SESSION
Else grant them.
The problem only comes when use do this in pl/sql.
here is a work around example.
create or replace function get_xml_data return varchar2 is
doc varchar2(1000) := '<schema
targetNamespace="http://www.oracle.com/PO.xsd"
xmlns:po="http://www.oracle.com/PO.xsd"
xmlns="http://www.w3.org/2001/XMLSchema">
<complexType name="PurchaseOrderType">
<sequence>
<element name="PONum" type="decimal"/>
<element name="Company">
<simpleType>
<restriction base="string">
<maxLength value="100"/>
</restriction>
</simpleType>
</element>
<element name="Item" maxOccurs="1000">
<complexType>
<sequence>
<element name="Part">
<simpleType>
<restriction base="string">
<maxLength value="1000"/>
</restriction>
</simpleType>
</element>
<element name="Price" type="float"/>
</sequence>
</complexType>
</element>
</sequence>
</complexType>
<element name="PurchaseOrder" type="po:PurchaseOrderType"/>
</schema>';
begin
return doc;
end;
exec dbms_xmlschema.registerSchema('http://www.oracle.com/PO.xsd', get_xml_data);
good luck.
Maybe you are looking for
-
Before updating from version 7 to 8 when i went into my bookmarks, and right clicked on a folder and clicked "Open All In Tabs" it would use the current bookmark that i had open as the first of these in the folder. It would then open the folder's boo
-
Problems with my Airport Snow. Please someone help!
I had an airport snow base station for a couple of years. I bought it used, and after some initial difficulty, I manage to set it up and it worked fine for a little while. At some point it started failing to connect and started giving me a message th
-
Dear experts, Could any body tell me how the pricing is read in the crm order ,could you tell me which function module is doing that. Thanks
-
StackOverflowError caused by conversion program
Hello all, I'm a bit new to Java, so please bear with me if the answer to my problem is an obvious one. I am trying to write a program to convert numbers (floating and negative, too) from the given base to base 10. As this is part of a larger project
-
OPM Business Area Associated with R12 of Apps
Hi All, We have decided to not go with purchasing views from an Oracle Partner (e.g. like Noetix) and consequently, we have decided to use the seeded views that come with Oracle Apps. Our OPM folder was very sparse. Specifically, it came with the fol