XML to Table Stracture
i have a batch structure in XML template:-
- <BATCH customer="ABC" name="ABC1" type="ABC_TYPE">
- <BATCH_SECTIONS>
- <SECTION name="X" dependency="NULL">
- <JOB_SECTIONS name="JOB1" dependency="NULL" >
- <JOBS>
<JOB type="X" sub_type="xx" dependency="NULL" />
<JOB type="X" sub_type="yy" dependency="NULL" />
<JOB type="X" sub_type="zz" dependency="NULL" />
</JOBS>
</JOB_SECTIONS>
</SECTION>
- <SECTION name="Y" dependency="X">
- <JOB_SECTIONS name="JOB2" dependency="X" >
- <JOBS>
<JOB type="Y" sub_type="xx" dependency="X" />
<JOB type="Y" sub_type="yy" dependency="X" />
<JOB type="Y" sub_type="zz" dependency="X" />
</JOBS>
</JOB_SECTIONS>
</SECTION>
- <SECTION name="Z" dependency="Y">
- <JOB_SECTIONS name="JOB3" dependency="NULL" >
- <JOBS>
<JOB type="....." sub_type="...." dependency="NULL" />
</JOBS>
</JOB_SECTIONS>
- <JOB_SECTIONS name="JOB4" dependency="NULL">
- <JOBS>
<JOB type="...." sub_type="...." dependency="NULL" />
</JOBS>
</JOB_SECTIONS>
</SECTION>
</BATCH_SECTIONS>
</BATCH>
1.Batch Structure having 3 section:-X,Y,Z
2.each section having :-one job-section (Z section having 2 JOB SECTION)
3.there is a dependency between sections.- completion of Y depends on X and completion of Z depend on completion of Y
4.Z-section having 2 JOB SECTION :- JOB3 and JOB4
My question is that i want to convert this XML template structure into a ORACLE table .
Regards
Amu_2007
With your own XML, something like this perhaps:
SQL> ed
Wrote file afiedt.buf
1 WITH t as (select XMLTYPE('
2 <BATCH customer="ABC" name="ABC1" type="ABC_TYPE">
3 <BATCH_SECTIONS>
4 <SECTION name="X" dependency="NULL">
5 <JOB_SECTIONS name="JOB1" dependency="NULL" >
6 <JOBS>
7 <JOB type="X" sub_type="xx" dependency="NULL" />
8 <JOB type="X" sub_type="yy" dependency="NULL" />
9 <JOB type="X" sub_type="zz" dependency="NULL" />
10 </JOBS>
11 </JOB_SECTIONS>
12 </SECTION>
13 <SECTION name="Y" dependency="X">
14 <JOB_SECTIONS name="JOB2" dependency="X" >
15 <JOBS>
16 <JOB type="Y" sub_type="xx" dependency="X" />
17 <JOB type="Y" sub_type="yy" dependency="X" />
18 <JOB type="Y" sub_type="zz" dependency="X" />
19 </JOBS>
20 </JOB_SECTIONS>
21 </SECTION>
22 <SECTION name="Z" dependency="Y">
23 <JOB_SECTIONS name="JOB3" dependency="NULL" >
24 <JOBS>
25 <JOB type="....." sub_type="...." dependency="NULL" />
26 </JOBS>
27 </JOB_SECTIONS>
28 <JOB_SECTIONS name="JOB4" dependency="NULL">
29 <JOBS>
30 <JOB type="...." sub_type="...." dependency="NULL" />
31 </JOBS>
32 </JOB_SECTIONS>
33 </SECTION>
34 </BATCH_SECTIONS>
35 </BATCH>
36 ') as xml from dual)
37 --
38 -- END OF TEST DATA
39 --
40 select a.customer, a.cust_name, a.cust_type
41 ,b.bat_name, NULLIF(b.bat_dependency,'NULL') as bat_dependency
42 ,c.job_sect_name, NULLIF(c.job_sect_dependency,'NULL') as job_sect_dependency
43 ,d.job_type, d.job_sub_type, NULLIF(d.job_dependency,'NULL') as job_dependency
44 from t
45 ,XMLTABLE('/BATCH'
46 PASSING t.xml
47 COLUMNS customer VARCHAR2(10) PATH '/BATCH/@customer'
48 ,cust_name VARCHAR2(10) PATH '/BATCH/@name'
49 ,cust_type VARCHAR2(10) PATH '/BATCH/@type'
50 ,bat_sections XMLTYPE PATH '/BATCH/BATCH_SECTIONS'
51 ) a
52 ,XMLTABLE('/BATCH_SECTIONS/SECTION'
53 PASSING a.bat_sections
54 COLUMNS bat_name VARCHAR2(10) PATH '/SECTION/@name'
55 ,bat_dependency VARCHAR2(10) PATH '/SECTION/@dependency'
56 ,section XMLTYPE PATH '/SECTION'
57 ) b
58 ,XMLTABLE('/SECTION/JOB_SECTIONS'
59 PASSING b.section
60 COLUMNS job_sect_name VARCHAR2(10) PATH '/JOB_SECTIONS/@name'
61 ,job_sect_dependency VARCHAR2(10) PATH '/JOB_SECTIONS/@dependency'
62 ,job_sections XMLTYPE PATH '/JOB_SECTIONS'
63 ) c
64 ,XMLTABLE('/JOB_SECTIONS/JOBS/JOB'
65 PASSING c.job_sections
66 COLUMNS job_type VARCHAR2(10) PATH '/JOB/@type'
67 ,job_sub_type VARCHAR2(10) PATH '/JOB/@sub_type'
68 ,job_dependency VARCHAR2(10) PATH '/JOB/@dependency'
69* ) d
SQL> /
CUSTOMER CUST_NAME CUST_TYPE BAT_NAME BAT_DEPEND JOB_SECT_N JOB_SECT_D JOB_TYPE JOB_SUB_TY JOB_DEPEND
ABC ABC1 ABC_TYPE X JOB1 X xx
ABC ABC1 ABC_TYPE X JOB1 X yy
ABC ABC1 ABC_TYPE X JOB1 X zz
ABC ABC1 ABC_TYPE Y X JOB2 X Y xx X
ABC ABC1 ABC_TYPE Y X JOB2 X Y yy X
ABC ABC1 ABC_TYPE Y X JOB2 X Y zz X
ABC ABC1 ABC_TYPE Z Y JOB3 ..... ....
ABC ABC1 ABC_TYPE Z Y JOB4 .... ....
8 rows selected.
SQL>Edited by: BluShadow on Mar 24, 2010 7:53 AM
Missed a level. ;)
Similar Messages
-
SAP J2EE Engine JTA Transaction Xml for table TABLE could not be ana
I'm having a weird case. I created 3 entity bean. In my R/3 will call this JCO.Function to do the insert to database. But out of 3 entity bean, only 1 entity bean got error where it unable to insert to database and have this error in the log.
The case is quite weird where i created the same entity but only 1 entity is not working as expected. Wondering what cause this problem.
Thanks.
org.xml.sax.SAXException: Fatal Error: URI=:main: Line=1: Fatal Error: com.sap.engine.lib.xml.parser.ParserException: Name expected: 0x20(:main:, row:1, col:218)#
at com.sap.dictionary.database.dbs.XmlExtractor$XMLErrorHandler.fatalError(XmlExtractor.java:279)#
at com.sap.engine.lib.xml.parser.SAXParser.parse(SAXParser.java:144)#
at com.sap.dictionary.database.dbs.XmlExtractor.map(XmlExtractor.java:130)#
at com.sap.dictionary.database.catalog.DbGeneralStructure.<init>(DbGeneralStructure.java:86)#
at com.sap.dictionary.database.catalog.XmlCatalogReader.getTable(XmlCatalogReader.java:90)#
at com.sap.sql.catalog.impl.BufferedCatalogReader.getTable(BufferedCatalogReader.java:124)#
at com.sap.sql.catalog.impl.BufferedCatalogReader.getTable(BufferedCatalogReader.java:87)#
at com.sap.sql.sqlparser.CheckColAndTabVisitor.checkTables(CheckColAndTabVisitor.java:299)#
at com.sap.sql.sqlparser.CheckColAndTabVisitor.performCatalogChecks(CheckColAndTabVisitor.java:176)#
at com.sap.sql.sqlparser.CommonSQLStatement.checkSemantics(CommonSQLStatement.java:169)#
at com.sap.sql.jdbc.common.StatementAnalyzerImpl.check(StatementAnalyzerImpl.java:35)#
at com.sap.sql.jdbc.common.StatementAnalyzerImpl.preprepareStatement(StatementAnalyzerImpl.java:101)#
at com.sap.sql.jdbc.common.StatementAnalyzerImpl.preprepareStatement(StatementAnalyzerImpl.java:87)#
at com.sap.sql.jdbc.common.AbstractCommonStatement.parseStatement(AbstractCommonStatement.java:472)#
at com.sap.sql.jdbc.common.CommonConnectionImpl.prepareStatement(CommonConnectionImpl.java:375)#
at com.sap.engine.services.dbpool.cci.ConnectionHandle.prepareStatement(ConnectionHandle.java:81)#
at net.tnb.model.ReasonCodeEntityBean3_0Persistent.ejb_iInsert(ReasonCodeEntityBean3_0Persistent.java:306)#
at com.sap.engine.services.ejb.entity.pm.UpdatablePersistent.ejbFlush(UpdatablePersistent.java:92)#
at com.sap.engine.services.ejb.entity.pm.TransactionContext.flushAll(TransactionContext.java:429)#
at com.sap.engine.services.ejb.entity.pm.TransactionContext.flush(TransactionContext.java:378)#
at com.sap.engine.services.ejb.entity.pm.TransactionContext.beforeCompletion(TransactionContext.java:506)#
at com.sap.engine.services.ejb.entity.SynchronizationList.beforeCompletion(SynchronizationList.java:136)#
at com.sap.engine.services.ts.jta.impl.TransactionImpl.commit(TransactionImpl.java:226)#
at net.tnb.model.ReasonCodeEntityHomeImpl3_0.create(ReasonCodeEntityHomeImpl3_0.java:546)#
at net.tnb.model.ReasonCodeEntityHome_Stub.create(ReasonCodeEntityHome_Stub.java:57)#
at net.tnb.model.EToGatewayBean.insertIntoTable(EToGatewayBean.java:223)#
at net.tnb.model.EToGatewayBean.processFunction(EToGatewayBean.java:166)#
at net.tnb.model.EToGatewayLocalLocalObjectImpl3_0.processFunction(EToGatewayLocalLocalObjectImpl3_0.java:175)#
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)#
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)#
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)#
at java.lang.reflect.Method.invoke(Method.java:324)#
at com.sap.engine.services.rfcengine.RFCDefaultRequestHandler.call(RFCDefaultRequestHandler.java:277)#
at com.sap.engine.services.rfcengine.RFCDefaultRequestHandler.handleRequest(RFCDefaultRequestHandler.java:219)#
at com.sap.engine.services.rfcengine.RFCJCOServer$J2EEApplicationRunnable.run(RFCJCOServer.java:260)#
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)#
at java.security.AccessController.doPrivileged(Native Method)#
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)#
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)#
##0#0#Error##Java###{0}.commit(), Cannot commit due to unexpected exception in beforeCompletion():
[EXCEPTION]
{1}#2#SAP J2EE Engine JTA Transaction : [031fffffff3ffffffb2005b]#java.lang.IllegalStateException: Xml for table <TABLE> could not be analysed
at com.sap.dictionary.database.catalog.XmlCatalogReader.getTable(XmlCatalogReader.java:100)
at com.sap.sql.catalog.impl.BufferedCatalogReader.getTable(BufferedCatalogReader.java:124)
at com.sap.sql.catalog.impl.BufferedCatalogReader.getTable(BufferedCatalogReader.java:87)
at com.sap.sql.sqlparser.CheckColAndTabVisitor.checkTables(CheckColAndTabVisitor.java:299)
at com.sap.sql.sqlparser.CheckColAndTabVisitor.performCatalogChecks(CheckColAndTabVisitor.java:176)
at com.sap.sql.sqlparser.CommonSQLStatement.checkSemantics(CommonSQLStatement.java:169)
at com.sap.sql.jdbc.common.StatementAnalyzerImpl.check(StatementAnalyzerImpl.java:35)
at com.sap.sql.jdbc.common.StatementAnalyzerImpl.preprepareStatement(StatementAnalyzerImpl.java:101)
at com.sap.sql.jdbc.common.StatementAnalyzerImpl.preprepareStatement(StatementAnalyzerImpl.java:87)
at com.sap.sql.jdbc.common.AbstractCommonStatement.parseStatement(AbstractCommonStatement.java:472)
at com.sap.sql.jdbc.common.CommonConnectionImpl.prepareStatement(CommonConnectionImpl.java:375)
at com.sap.engine.services.dbpool.cci.ConnectionHandle.prepareStatement(ConnectionHandle.java:81)
at net.tnb.model.ReasonCodeEntityBean3_0Persistent.ejb_iInsert(ReasonCodeEntityBean3_0Persistent.java:306)
at com.sap.engine.services.ejb.entity.pm.UpdatablePersistent.ejbFlush(UpdatablePersistent.java:92)
at com.sap.engine.services.ejb.entity.pm.TransactionContext.flushAll(TransactionContext.java:429)
at com.sap.engine.services.ejb.entity.pm.TransactionContext.flush(TransactionContext.java:378)
at com.sap.engine.services.ejb.entity.pm.TransactionContext.beforeCompletion(TransactionContext.java:506)
at com.sap.engine.services.ejb.entity.SynchronizationList.beforeCompletion(SynchronizationList.java:136)
at com.sap.engine.services.ts.jta.impl.TransactionImpl.commit(TransactionImpl.java:226)
at net.tnb.model.ReasonCodeEntityHomeImpl3_0.create(ReasonCodeEntityHomeImpl3_0.java:546)
at net.tnb.model.ReasonCodeEntityHome_Stub.create(ReasonCodeEntityHome_Stub.java:57)
at net.tnb.model.EToGatewayBean.insertIntoTable(EToGatewayBean.java:223)
at net.tnb.model.EToGatewayBean.processFunction(EToGatewayBean.java:166)
at net.tnb.model.EToGatewayLocalLocalObjectImpl3_0.processFunction(EToGatewayLocalLocalObjectImpl3_0.java:175)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.sap.engine.services.rfcengine.RFCDefaultRequestHandler.call(RFCDefaultRequestHandler.java:277)
at com.sap.engine.services.rfcengine.RFCDefaultRequestHandler.handleRequest(RFCDefaultRequestHandler.java:219)
at com.sap.engine.services.rfcengine.RFCJCOServer$J2EEApplicationRunnable.run(RFCJCOServer.java:260)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
#1.5 #001A6467CDF400590000004E000018D8000459BB785F496C#1224561620123#com.sap.engine.services.ts#sap.com/ESolutionsEGatewayEAR#com.sap.engine.services.ts#J2EE_GUEST#0####95b74d409f2411dd86c4001a6467cdf4#SAPEngine_Application_Thread[impl:3]_20##0#0#Error#1#/System/Server#Java#ts_0004##Exception in beforeCompletition of ( SAP J2EE Engine JTA Transaction : [031fffffff3ffffffb2005b] ).#1#SAP J2EE Engine JTA Transaction : [031fffffff3ffffffb2005b]#
#1.5 #001A6467CDF400590000004F000018D8000459BB785F4BC5#1224561620123#com.sap.engine.services.ts#sap.com/ESolutionsEGatewayEAR#com.sap.engine.services.ts#J2EE_GUEST#0####95b74d409f2411dd86c4001a6467cdf4#SAPEngine_Application_Thread[impl:3]_20##0#0#Error#1#/System/Audit#Java###Exception {0}#1#com.sap.engine.services.ts.exceptions.BaseRollbackException: Exception in beforeCompletition of ( SAP J2EE Engine JTA Transaction : [031fffffff3ffffffb2005b] ).
at com.sap.engine.services.ts.jta.impl.TransactionImpl.commit(TransactionImpl.java:236)
at net.tnb.model.ReasonCodeEntityHomeImpl3_0.create(ReasonCodeEntityHomeImpl3_0.java:546)
at net.tnb.model.ReasonCodeEntityHome_Stub.create(ReasonCodeEntityHome_Stub.java:57)
at net.tnb.model.EToGatewayBean.insertIntoTable(EToGatewayBean.java:223)
at net.tnb.model.EToGatewayBean.processFunction(EToGatewayBean.java:166)
at net.tnb.model.EToGatewayLocalLocalObjectImpl3_0.processFunction(EToGatewayLocalLocalObjectImpl3_0.java:175)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.sap.engine.services.rfcengine.RFCDefaultRequestHandler.call(RFCDefaultRequestHandler.java:277)
at com.sap.engine.services.rfcengine.RFCDefaultRequestHandler.handleRequest(RFCDefaultRequestHandler.java:219)
at com.sap.engine.services.rfcengine.RFCJCOServer$J2EEApplicationRunnable.run(RFCJCOServer.java:260)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
Caused by: java.lang.IllegalStateException: Xml for table ZREASON_CODE could not be analysed
at com.sap.dictionary.database.catalog.XmlCatalogReader.getTable(XmlCatalogReader.java:100)
at com.sap.sql.catalog.impl.BufferedCatalogReader.getTable(BufferedCatalogReader.java:124)
at com.sap.sql.catalog.impl.BufferedCatalogReader.getTable(BufferedCatalogReader.java:87)
at com.sap.sql.sqlparser.CheckColAndTabVisitor.checkTables(CheckColAndTabVisitor.java:299)
at com.sap.sql.sqlparser.CheckColAndTabVisitor.performCatalogChecks(CheckColAndTabVisitor.java:176)
at com.sap.sql.sqlparser.CommonSQLStatement.checkSemantics(CommonSQLStatement.java:169)
at com.sap.sql.jdbc.common.StatementAnalyzerImpl.check(StatementAnalyzerImpl.java:35)
at com.sap.sql.jdbc.common.StatementAnalyzerImpl.preprepareStatement(StatementAnalyzerImpl.java:101)
at com.sap.sql.jdbc.common.StatementAnalyzerImpl.preprepareStatement(StatementAnalyzerImpl.java:87)
at com.sap.sql.jdbc.common.AbstractCommonStatement.parseStatement(AbstractCommonStatement.java:472)
at com.sap.sql.jdbc.common.CommonConnectionImpl.prepareStatement(CommonConnectionImpl.java:375)
at com.sap.engine.services.dbpool.cci.ConnectionHandle.prepareStatement(ConnectionHandle.java:81)
at net.tnb.model.ReasonCodeEntityBean3_0Persistent.ejb_iInsert(ReasonCodeEntityBean3_0Persistent.java:306)
at com.sap.engine.services.ejb.entity.pm.UpdatablePersistent.ejbFlush(UpdatablePersistent.java:92)
at com.sap.engine.services.ejb.entity.pm.TransactionContext.flushAll(TransactionContext.java:429)
at com.sap.engine.services.ejb.entity.pm.TransactionContext.flush(TransactionContext.java:378)
at com.sap.engine.services.ejb.entity.pm.TransactionContext.beforeCompletion(TransactionContext.java:506)
at com.sap.engine.services.ejb.entity.SynchronizationList.beforeCompletion(SynchronizationList.java:136)
at com.sap.engine.services.ts.jta.impl.TransactionImpl.commit(TransactionImpl.java:226)
... 16 more
#1.5 #001A6467CDF4005900000050000018D8000459BB785F4E8F#1224561620123#com.sap.engine.services.ejb.entity.Container#sap.com/ESolutionsEGatewayEAR#com.sap.engine.services.ejb.entity.Container#J2EE_GUEST#0####95b74d409f2411dd86c4001a6467cdf4#SAPEngine_Application_Thread[impl:3]_20##0#0#Error##Java###null
[EXCEPTION]
{0}#1#com.sap.engine.services.ejb.exceptions.BaseRemoteException: Transaction system failure in method net.tnb.model.ReasonCodeEntityHomeImpl3_0.create(net.tnb.model.ReasonCodeBean).
at net.tnb.model.ReasonCodeEntityHomeImpl3_0.create(ReasonCodeEntityHomeImpl3_0.java:573)
at net.tnb.model.ReasonCodeEntityHome_Stub.create(ReasonCodeEntityHome_Stub.java:57)
at net.tnb.model.EToGatewayBean.insertIntoTable(EToGatewayBean.java:223)
at net.tnb.model.EToGatewayBean.processFunction(EToGatewayBean.java:166)
at net.tnb.model.EToGatewayLocalLocalObjectImpl3_0.processFunction(EToGatewayLocalLocalObjectImpl3_0.java:175)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.sap.engine.services.rfcengine.RFCDefaultRequestHandler.call(RFCDefaultRequestHandler.java:277)
at com.sap.engine.services.rfcengine.RFCDefaultRequestHandler.handleRequest(RFCDefaultRequestHandler.java:219)
at com.sap.engine.services.rfcengine.RFCJCOServer$J2EEApplicationRunnable.run(RFCJCOServer.java:260)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
Caused by: com.sap.engine.services.ts.exceptions.BaseRollbackException: Exception in beforeCompletition of ( SAP J2EE Engine JTA Transaction : [031fffffff3ffffffb2005b] ).
at com.sap.engine.services.ts.jta.impl.TransactionImpl.commit(TransactionImpl.java:236)
at net.tnb.model.ReasonCodeEntityHomeImpl3_0.create(ReasonCodeEntityHomeImpl3_0.java:546)
... 15 more
Caused by: java.lang.IllegalStateException: Xml for table ZREASON_CODE could not be analysed
at com.sap.dictionary.database.catalog.XmlCatalogReader.getTable(XmlCatalogReader.java:100)
at com.sap.sql.catalog.impl.BufferedCatalogReader.getTable(BufferedCatalogReader.java:124)
at com.sap.sql.catalog.impl.BufferedCatalogReader.getTable(BufferedCatalogReader.java:87)
at com.sap.sql.sqlparser.CheckColAndTabVisitor.checkTables(CheckColAndTabVisitor.java:299)
at com.sap.sql.sqlparser.CheckColAndTabVisitor.performCatalogChecks(CheckColAndTabVisitor.java:176)
at com.sap.sql.sqlparser.CommonSQLStatement.checkSemantics(CommonSQLStatement.java:169)
at com.sap.sql.jdbc.common.StatementAnalyzerImpl.check(StatementAnalyzerImpl.java:35)
at com.sap.sql.jdbc.common.StatementAnalyzerImpl.preprepareStatement(StatementAnalyzerImpl.java:101)
at com.sap.sql.jdbc.common.StatementAnalyzerImpl.preprepareStatement(StatementAnalyzerImpl.java:87)
at com.sap.sql.jdbc.common.AbstractCommonStatement.parseStatement(AbstractCommonStatement.java:472)
at com.sap.sql.jdbc.common.CommonConnectionImpl.prepareStatement(CommonConnectionImpl.java:375)
at com.sap.engine.services.dbpool.cci.ConnectionHandle.prepareStatement(ConnectionHandle.java:81)
at net.tnb.model.ReasonCodeEntityBean3_0Persistent.ejb_iInsert(ReasonCodeEntityBean3_0Persistent.java:306)
at com.sap.engine.services.ejb.entity.pm.UpdatablePersistent.ejbFlush(UpdatablePersistent.java:92)
at com.sap.engine.services.ejb.entity.pm.TransactionContext.flushAll(TransactionContext.java:429)
at com.sap.engine.services.ejb.entity.pm.TransactionContext.flush(TransactionContext.java:378)
at com.sap.engine.services.ejb.entity.pm.TransactionContext.beforeCompletion(TransactionContext.java:506)
at com.sap.engine.services.ejb.entity.SynchronizationList.beforeCompletion(SynchronizationList.java:136)
at com.sap.engine.services.ts.jta.impl.TransactionImpl.commit(TransactionImpl.java:226)
... 16 more
#1.5 #001A6467CDF4005900000051000018D8000459BB785F5FA9#1224561620123#System.err#sap.com/ESolutionsEGatewayEAR#System.err#J2EE_GUEST#0####95b74d409f2411dd86c4001a6467cdf4#SAPEngine_Application_Thread[impl:3]_20##0#0#Error##Plain###RemoteException insertOk=false#
#1.5 #001A6467CDF4005900000052000018D8000459BB785F6094#1224561620123#System.err#sap.com/ESolutionsEGatewayEAR#System.err#J2EE_GUEST#0####95b74d409f2411dd86c4001a6467cdf4#SAPEngine_Application_Thread[impl:3]_20##0#0#Error##Plain###Tue Oct 21 12:00:20 SGT 2008 java.rmi.RemoteException: com.sap.engine.services.ejb.exceptions.BaseRemoteException: Transaction system failure in method net.tnb.model.ReasonCodeEntityHomeImpl3_0.create(net.tnb.model.ReasonCodeBean).
at net.tnb.model.ReasonCodeEntityHomeImpl3_0.create(ReasonCodeEntityHomeImpl3_0.java:573)
at net.tnb.model.ReasonCodeEntityHome_Stub.create(ReasonCodeEntityHome_Stub.java:57)
at net.tnb.model.EToGatewayBean.insertIntoTable(EToGatewayBean.java:223)
at net.tnb.model.EToGatewayBean.processFunction(EToGatewayBean.java:166)
at net.tnb.model.EToGatewayLocalLocalObjectImpl3_0.processFunction(EToGatewayLocalLocalObjectImpl3_0.java:175)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.sap.engine.services.rfcengine.RFCDefaultRequestHandler.call(RFCDefaultRequestHandler.java:277)
at com.sap.engine.services.rfcengine.RFCDefaultRequestHandler.handleRequest(RFCDefaultRequestHandler.java:219)
at com.sap.engine.services.rfcengine.RFCJCOServer$J2EEApplicationRunnable.run(RFCJCOServer.java:260)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
Caused by: com.sap.engine.services.ts.exceptions.BaseRollbackException: Exception in beforeCompletition of ( SAP J2EE Engine JTA Transaction : [031fffffff3ffffffb2005b] ).
at com.sap.engine.services.ts.jta.impl.TransactionImpl.commit(TransactionImpl.java:236)
at net.tnb.model.ReasonCodeEntityHomeImpl3_0.create(ReasonCodeEntityHomeImpl3_0.java:546)
... 15 more
Caused by: java.lang.IllegalStateException: Xml for table <TABLE> could not be analysed
at com.sap.dictionary.database.catalog.XmlCatalogReader.getTable(XmlCatalogReader.java:100)
at com.sap.sql.catalog.impl.BufferedCatalogReader.getTable(BufferedCatalogReader.java:124)
at com.sap.sql.catalog.impl.BufferedCatalogReader.getTable(BufferedCatalogReader.java:87)
at com.sap.sql.sqlparser.CheckColAndTabVisitor.checkTables(CheckColAndTabVisitor.java:299)
at com.sap.sql.sqlparser.CheckColAndTabVisitor.performCatalogChecks(CheckColAndTabVisitor.java:176)
at com.sap.sql.sqlparser.CommonSQLStatement.checkSemantics(CommonSQLStatement.java:169)
at com.sap.sql.jdbc.common.StatementAnalyzerImpl.check(StatementAnalyzerImpl.java:35)
at com.sap.sql.jdbc.common.StatementAnalyzerImpl.preprepareStatement(StatementAnalyzerImpl.java:101)
at com.sap.sql.jdbc.common.StatementAnalyzerImpl.preprepareStatement(StatementAnalyzerImpl.java:87)
at com.sap.sql.jdbc.common.AbstractCommonStatement.parseStatement(AbstractCommonStatement.java:472)
at com.sap.sql.jdbc.common.CommonConnectionImpl.prepareStatement(CommonConnectionImpl.java:375)
at com.sap.engine.services.dbpool.cci.ConnectionHandle.prepareStatement(ConnectionHandle.java:81)
at net.tnb.model.ReasonCodeEntityBean3_0Persistent.ejb_iInsert(ReasonCodeEntityBean3_0Persistent.java:306)
at com.sap.engine.services.ejb.entity.pm.UpdatablePersistent.ejbFlush(UpdatablePersistent.java:92)
at com.sap.engine.services.ejb.entity.pm.TransactionContext.flushAll(TransactionContext.java:429)
at com.sap.engine.services.ejb.entity.pm.TransactionContext.flush(TransactionContext.java:378)
at com.sap.engine.services.ejb.entity.pm.TransactionContext.beforeCompletion(TransactionContext.java:506)
at com.sap.engine.services.ejb.entity.SynchronizationList.beforeCompletion(SynchronizationList.java:136)
at com.sap.engine.services.ts.jta.impl.TransactionImpl.commit(TransactionImpl.java:226)
... 16 more
; nested exception is:
javax.transaction.RollbackException: com.sap.engine.services.ts.exceptions.BaseRollbackException: Exception in beforeCompletition of ( SAP J2EE Engine JTA Transaction : [031fffffff3ffffffb2005b] ).
at com.sap.engine.services.ts.jta.impl.TransactionImpl.commit(TransactionImpl.java:236)
at net.tnb.model.ReasonCodeEntityHomeImpl3_0.create(ReasonCodeEntityHomeImpl3_0.java:546)
at net.tnb.model.ReasonCodeEntityHome_Stub.create(ReasonCodeEntityHome_Stub.java:57)
at net.tnb.model.EToGatewayBean.insertIntoTable(EToGatewayBean.java:223)
at net.tnb.model.EToGatewayBean.processFunction(EToGatewayBean.java:166)
at net.tnb.model.EToGatewayLocalLocalObjectImpl3_0.processFunction(EToGatewayLocalLocalObjectImpl3_0.java:175)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.sap.engine.services.rfcengine.RFCDefaultRequestHandler.call(RFCDefaultRequestHandler.java:277)
at com.sap.engine.services.rfcengine.RFCDefaultRequestHandler.handleRequest(RFCDefaultRequestHandler.java:219)
at com.sap.engine.services.rfcengine.RFCJCOServer$J2EEApplicationRunnable.run(RFCJCOServer.java:260)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
Caused by: java.lang.IllegalStateException: Xml for table ZREASON_CODE could not be analysed
at com.sap.dictionary.database.catalog.XmlCatalogReader.getTable(XmlCatalogReader.java:100)
at com.sap.sql.catalog.impl.BufferedCatalogReader.getTable(BufferedCatalogReader.java:124)
at com.sap.sql.catalog.impl.BufferedCatalogReader.getTable(BufferedCatalogReader.java:87)
at com.sap.sql.sqlparser.CheckColAndTabVisitor.checkTables(CheckColAndTabVisitor.java:299)
at com.sap.sql.sqlparser.CheckColAndTabVisitor.performCatalogChecks(CheckColAndTabVisitor.java:176)
at com.sap.sql.sqlparser.CommonSQLStatement.checkSemantics(CommonSQLStatement.java:169)
at com.sap.sql.jdbc.common.StatementAnalyzerImpl.check(StatementAnalyzerImpl.java:35)
at com.sap.sql.jdbc.common.StatementAnalyzerImpl.preprepareStatement(StatementAnalyzerImpl.java:101)
at com.sap.sql.jdbc.common.StatementAnalyzerImpl.preprepareStatement(StatementAnalyzerImpl.java:87)
at com.sap.sql.jdbc.common.AbstractCommonStatement.parseStatement(AbstractCommonStatement.java:472)
at com.sap.sql.jdbc.common.CommonConnectionImpl.prepareStatement(CommonConnectionImpl.java:375)
at com.sap.engine.services.dbpool.cci.ConnectionHandle.prepareStatement(ConnectionHandle.java:81)
at net.tnb.model.ReasonCodeEntityBean3_0Persistent.ejb_iInsert(ReasonCodeEntityBean3_0Persistent.java:306)
at com.sap.engine.services.ejb.entity.pm.UpdatablePersistent.ejbFlush(UpdatablePersistent.java:92)
at com.sap.engine.services.ejb.entity.pm.TransactionContext.flushAll(TransactionContext.java:429)
at com.sap.engine.services.ejb.entity.pm.TransactionContext.flush(TransactionContext.java:378)
at com.sap.engine.services.ejb.entity.pm.TransactionContext.beforeCompletion(TransactionContext.java:506)
at com.sap.engine.services.ejb.entity.SynchronizationList.beforeCompletion(SynchronizationList.java:136)
at com.sap.engine.services.ts.jta.impl.TransactionImpl.commit(TransactionImpl.java:226)
... 16 moreHi Stefan and Everyone,
I have solved my problem. Just want to let everyone know if u have to install the SP's for WEB AS 6.30/6.40.
You start from the installation from CD 6.30/6.40. Everything will be working at this point. You can login to Visual Admin, Config tool and SDM.
Before you apply any SP's, do the following:
a) Create an emergency user with the Administrator rights: Ref OSS Note:669848
Try to follow this route for SP's:
From CD 6.30/6.40 -> SP04 -> SP07
Apply SP04 first before applying SP07 (Recommended Approach).
Refer the installation guide: SAP Web AS Support Package Guide 630SP2 to 640SP4.
Use JDK1.4.2_05 to install SP04. You must reference the following OSS Notes and apply to your system accordingly, this is the key to an error free installation:
a) OSS Note: 697535
b) OSS Note: 709140
c) OSS Note: 716604
d) OSS Note: 706378
You have to be really careful with SP04 installation, because it changes the version from 6.30 -> 6.40.
Once you are able to install SP04 without any problems, you can directly apply SP07 or the highest 6.40 SP.
Kind Regards,
Buddha. -
XML-Cals table with aid namespaces
hi at all!
i have a xml-cals table which i'd like to import in indesign including the aid-namespaces especially the tablestyle. for me, it never worked out. is it actually possible to include the aid namespaces in a xml-cals table model?!
thanks in advace
juerschen
this is my cals table:
<eigenschaften_tab>
<table typ="eigenschaften" tab_modell="CALS">
<tgroup cols="2">
<colspec colnum="1" colname="eigenschaft" colwidth="72.87007874021651pt"/>
<colspec colnum="2" colname="ausprägung" colwidth="93.89370078728348pt"/>
<tbody>
<row>
<entry>Standort:</entry>
<entry>hell, halbschattig</entry>
</row>
<row>
<entry>Wuchs:</entry>
<entry>mittel</entry>
</row>
<row>
<entry>Pflanzenschmuck:</entry>
<entry>Blatt</entry>
</row>
<row>
<entry>Farbe:</entry>
<entry>gelb, grün</entry>
</row>
</tbody>
</tgroup>
</table>
</eigenschaften_tab>Hi,
I think that it is not possible because the CALS and InDesign XML are using different namespaces.
-Nissan -
Interface to get inbond XML into tables
We have Oracle 7.3 and HP-UX. We have a requirement to get XML from client and get the data into our tables.
I think we need to install Oracle XDK and parse the XML and put it in Oracle using JDBC.
I need to know which version of XDK I should install in HP-UX/Oracle 7.3?
Can anyone provide a sample code to insert data from XML to tables?
We have a standard XML with data in tags. No attributes.We have Oracle 7.3 and HP-UX. We have a requirement to get XML from client and get the data into our tables.
I think we need to install Oracle XDK and parse the XML and put it in Oracle using JDBC.
I need to know which version of XDK I should install in HP-UX/Oracle 7.3?
Can anyone provide a sample code to insert data from XML to tables?
We have a standard XML with data in tags. No attributes. -
Ora3113 trying to create xml type table
I registered a rather large schema. When I try to create an XML type table either using OEM or via sqlplus I get an end of file on communication error.
SQL*Plus: Release 9.2.0.1.0 - Production on Tue Aug 27 15:24:01 2002
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected.
CREATE TABLE "SYSTEM"."XMLTEXT" OF SYS.XMLTYPE XMLSCHEMA "http://xmlns.oracle.com/xdb/schemas/SYSTEM/www.oracle.com/xsd/visora.xsd" ELEMENT "Text"
ERROR at line 1:
ORA-03113: end-of-file on communication channelI registered a rather large schema. When I try to create an XML type table either using OEM or via sqlplus I get an end of file on communication error.
SQL*Plus: Release 9.2.0.1.0 - Production on Tue Aug 27 15:24:01 2002
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected.
CREATE TABLE "SYSTEM"."XMLTEXT" OF SYS.XMLTYPE XMLSCHEMA "http://xmlns.oracle.com/xdb/schemas/SYSTEM/www.oracle.com/xsd/visora.xsd" ELEMENT "Text"
ERROR at line 1:
ORA-03113: end-of-file on communication channel -
Recover data in XML audit table
Oracle 11gR1 rhel5 64 bti
Hi all,
I was wondering if anyone knows how we can recover data that is captured in an XML audit table?
thanks.Ok, It looks like I misunderstood the request.
Here is what management would like me to do.
Say there is a table X and we update a row in that table. Now that change (UPDATE) has been captured by an audit table, whose structure looks like the following:
CREATE TABLE FPRCHR.AUDIT_TRAIL
AUDIT_TRAIL_RID NUMBER CONSTRAINT NN_AUDIT_TRAIL_PK NOT NULL,
AUDIT_TIMESTAMP TIMESTAMP(6),
ACTION VARCHAR2(30 BYTE),
TABLE_OWNER VARCHAR2(30 BYTE),
TABLE_NAME VARCHAR2(30 BYTE),
USERNAME VARCHAR2(64 BYTE),
ROW_KEY SYS.XMLTYPE,
OLD_ROW SYS.XMLTYPE,
NEW_ROW SYS.XMLTYPE
TABLESPACE FPRCHRDAT01
PCTUSED 0
PCTFREE 10
INITRANS 1
MAXTRANS 255
STORAGE (
INITIAL 80K
NEXT 1M
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
LOGGING
NOCOMPRESS
XMLTYPE ROW_KEY STORE AS CLOB
( TABLESPACE FPRCHRDAT01
ENABLE STORAGE IN ROW
CHUNK 16384
PCTVERSION 10
NOCACHE
INDEX (
TABLESPACE FPRCHRDAT01
STORAGE (
INITIAL 80K
NEXT 1
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
STORAGE (
INITIAL 80K
NEXT 1M
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
LOB (SYS_NC00010$) STORE AS
( TABLESPACE FPRCHRDAT01
ENABLE STORAGE IN ROW
CHUNK 16384
PCTVERSION 10
NOCACHE
INDEX (
TABLESPACE FPRCHRDAT01
STORAGE (
INITIAL 80K
NEXT 1
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
STORAGE (
INITIAL 80K
NEXT 1M
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
XMLTYPE OLD_ROW STORE AS CLOB
( TABLESPACE FPRCHRDAT01
ENABLE STORAGE IN ROW
CHUNK 16384
PCTVERSION 10
NOCACHE
INDEX (
TABLESPACE FPRCHRDAT01
STORAGE (
INITIAL 80K
NEXT 1
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
STORAGE (
INITIAL 80K
NEXT 1M
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
NOCACHE
NOPARALLEL
MONITORING;
However, we realised that the update was incorrect and needs to be undone. So we want to take the change that was captured in the audit trail table (which would be in the old_row column) for table X and insert that back into table X. Keeping in mind that the row is an XML row.
How could I do that?
Thanks. -
Insertion in XML Type table and fetching the data in Pro*C
I have a Pro*C program written which populate one temp table. That temp table is used for writing the records to a flat file and then the table is purged by this program itself. Now my requirement is to write a new procedure in this progarm which simultaneously populate new XML Type table. Also i have to write some other procedures/functions to query the XML type table
in Pro*C. I am new to XML part of database. Could somebody suggest how to go ahead with this problemPlease check the Oracle Database 10g: XML DB Developer's Guild for example.
-
Hi everyone,
I'm just starting to explore the possibilities of XML in InDesign and in need of some general information:
The projects that I'm working with that I think would benefit from the XML workflow are files that include a number of tables (e.g., product names, descriptions, prices, etc. with header rows and some merged cells).
The content of the tables are the same for a brochure-style layout and a poster-style layout but the brochure tables need to be tall and narrow and the poster tables short and wide (basically flipping the axes). So far I've handled this through a complicated dance of exporting the tables as text and using Excel to flip the axes and then import the tables back into InDesign (in order for this to work, I have to un-merge all merged cells and it still isn't perfect but a reasonable starting point).
The editors make changes to the content in InDesign using InCopy (adding or removing rows or columns to add new products and/or prices, etc.)
The poster and brochure versions of the file don't need to be live at the same time--they're used at different times of the year so it's a matter of loading the final brochure content into the poster then making any changes to the poster and 6 months later importing the final poster content into the brochure. And the cycle continues.
Would XML handle well? The little I've read so far about XML and tables indicates that each cell would need to be tagged. This could easily result in mis-tagging a cell which would screw up the content import, right? I'm talking about hundreds (thousands?) of cells.
And since the structure of the table would be changing due to adding/removing rows/columns, it seems I would need to tag each cell of the tables every time I wanted to import content.
Am I understanding all this correctly?
Thanks for your input.Hi
You are right each cell nee to be tagged in XML tables, if you are working with more than hundreds/thousands of cells, be careful in content tagging. adding/removing columns/rows would really affect the structure of the XML and if it need to extract/export the content the structure of XML will not be correct. It is better to avoid XML tables in case of adding/removing columns/rows. -
Hello, could anyone help me on this? I have a XML file as below:
<Feed>
<svc>enr1</svc>
<report_email>[email protected]</report_email>
<requisition id="12">
<email>[email protected]</email>
<Name>Joseph</Name>
<PRODUCT>
<PROD_ID>532343234</PROD_ID>
<NAME>KID'S WEAR </NAME>
<DATE_ORDERED>09/04/2009</DATE_ORDERED>
</PRODUCT>
<PRODUCT>
<PROD_ID>67045434</PROD_ID>
<NAME>SHOES</NAME>
<DATE_ORDERED>09/04/2009</DATE_ORDERED>
</PRODUCT>
</requisition>
<requisition id="13">
<email>[email protected]</email>
<Name>Sarah</Name>
<PRODUCT>
<PROD_ID>11111111</PROD_ID>
<NAME>LOST IN FOREST</NAME>
<DATE_ORDERED>10/05/2008</DATE_ORDERED>
</PRODUCT>
<PRODUCT>
<PROD_ID>222222222</PROD_ID>
<NAME>TRY IT NOW</NAME>
<DATE_ORDERED>09/04/2007</DATE_ORDERED>
</PRODUCT>
</requisition>
</Feed>You could flatten the XML into table style output using XMLTABLE...
WITH t as (select XMLTYPE('
<RECSET>
<REC>
<COUNTRY>1</COUNTRY>
<POINT>1800</POINT>
<USER_INFO>
<USER_ID>1</USER_ID>
<TARGET>28</TARGET>
<STATE>6</STATE>
<TASK>12</TASK>
</USER_INFO>
<USER_INFO>
<USER_ID>5</USER_ID>
<TARGET>19</TARGET>
<STATE>1</STATE>
<TASK>90</TASK>
</USER_INFO>
</REC>
<REC>
<COUNTRY>2</COUNTRY>
<POINT>2400</POINT>
<USER_INFO>
<USER_ID>3</USER_ID>
<TARGET>14</TARGET>
<STATE>7</STATE>
<TASK>5</TASK>
</USER_INFO>
</REC>
</RECSET>') as xml from dual)
-- END OF TEST DATA
select x.country, x.point, y.user_id, y.target, y.state, y.task
from t
,XMLTABLE('/RECSET/REC'
PASSING t.xml
COLUMNS country NUMBER PATH '/REC/COUNTRY'
,point NUMBER PATH '/REC/POINT'
,user_info XMLTYPE PATH '/REC/*'
) x
,XMLTABLE('/USER_INFO'
PASSING x.user_info
COLUMNS user_id NUMBER PATH '/USER_INFO/USER_ID'
,target NUMBER PATH '/USER_INFO/TARGET'
,state NUMBER PATH '/USER_INFO/STATE'
,task NUMBER PATH '/USER_INFO/TASK'
) y
COUNTRY POINT USER_ID TARGET STATE TASK
1 1800 1 28 6 12
1 1800 5 19 1 90
2 2400 3 14 7 5Or you could shread the XML into Oracle nested tables...
e.g.
(Based on response from mdrake on this thread: Re: XML file processing into oracle
Reading XML using a schema...
declare
SCHEMAURL VARCHAR2(256) := 'http://xmlns.example.org/xsd/testcase.xsd';
XMLSCHEMA VARCHAR2(4000) := '<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb" xdb:storeVarrayAsTable="true">
<xs:element name="cust_order" type="cust_orderType" xdb:defaultTable="CUST_ORDER_TBL"/>
<xs:complexType name="groupType" xdb:maintainDOM="false">
<xs:sequence>
<xs:element name="item" type="itemType" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="id" type="xs:byte" use="required"/>
</xs:complexType>
<xs:complexType name="itemType" xdb:maintainDOM="false">
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="id" type="xs:short" use="required"/>
<xs:attribute name="name" type="xs:string" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="cust_orderType" xdb:maintainDOM="false">
<xs:sequence>
<xs:element name="group" type="groupType" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="cust_id" type="xs:short" use="required"/>
</xs:complexType>
</xs:schema>';
INSTANCE CLOB :=
'<cust_order cust_id="12345">
<group id="1">
<item id="1" name="Standard Mouse">100</item>
<item id="2" name="Keyboard">100</item>
<item id="3" name="Memory Module 2Gb">200</item>
<item id="4" name="Processor 3Ghz">25</item>
<item id="5" name="Processor 2.4Ghz">75</item>
</group>
<group id="2">
<item id="1" name="Graphics Tablet">15</item>
<item id="2" name="Keyboard">15</item>
<item id="3" name="Memory Module 4Gb">15</item>
<item id="4" name="Processor Quad Core 2.8Ghz">15</item>
</group>
<group id="3">
<item id="1" name="Optical Mouse">5</item>
<item id="2" name="Ergo Keyboard">5</item>
<item id="3" name="Memory Module 2Gb">10</item>
<item id="4" name="Processor Dual Core 2.4Ghz">5</item>
<item id="5" name="Dual Output Graphics Card">5</item>
<item id="6" name="28inch LED Monitor">10</item>
<item id="7" name="Webcam">5</item>
<item id="8" name="A3 1200dpi Laser Printer">2</item>
</group>
</cust_order>';
begin
dbms_xmlschema.registerSchema
schemaurl => SCHEMAURL
,schemadoc => XMLSCHEMA
,local => TRUE
,genTypes => TRUE
,genBean => FALSE
,genTables => TRUE
,ENABLEHIERARCHY => DBMS_XMLSCHEMA.ENABLE_HIERARCHY_NONE
execute immediate 'insert into CUST_ORDER_TBL values (XMLTYPE(:INSTANCE))' using INSTANCE;
end;
desc CUST_ORDER_TBL
SQL> desc CUST_ORDER_TBL
Name Null? Type
TABLE of SYS.XMLTYPE(XMLSchema "http://xmlns.example.org/xsd/testcase.xsd" Element "cust_order") STORAGE Object-relational TYPE "cust_orderType222_T"
set autotrace on explain
set pages 60 lines 164 heading on
col cust_id format a8
select extract(object_value,'/cust_order/@cust_id') as cust_id
,grp.id as group_id, itm.id as item_id, itm.inm as item_name, itm.qty as item_qty
from CUST_ORDER_TBL
,XMLTABLE('/cust_order/group'
passing object_value
columns id number path '@id'
,item xmltype path 'item'
) grp
,XMLTABLE('/item'
passing grp.item
columns id number path '@id'
,inm varchar2(30) path '@name'
,qty number path '.'
) itm
CUST_ID GROUP_ID ITEM_ID ITEM_NAME ITEM_QTY
12345 1 1 Standard Mouse 100
12345 1 2 Keyboard 100
12345 1 3 Memory Module 2Gb 200
12345 1 4 Processor 3Ghz 25
12345 1 5 Processor 2.4Ghz 75
12345 2 1 Graphics Tablet 15
12345 2 2 Keyboard 15
12345 2 3 Memory Module 4Gb 15
12345 2 4 Processor Quad Core 2.8Ghz 15
12345 3 1 Optical Mouse 5
12345 3 2 Ergo Keyboard 5
12345 3 3 Memory Module 2Gb 10
12345 3 4 Processor Dual Core 2.4Ghz 5
12345 3 5 Dual Output Graphics Card 5
12345 3 6 28inch LED Monitor 10
12345 3 7 Webcam 5
12345 3 8 A3 1200dpi Laser Printer 2
17 rows selected.Need at least 10.2.0.3 for performance i.e. to avoid COLLECTION ITERATOR PICKLER FETCH in execution plan...
On 10.2.0.1:
Execution Plan
Plan hash value: 3741473841
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 24504 | 89M| 873 (1)| 00:00:11 |
| 1 | NESTED LOOPS | | 24504 | 89M| 873 (1)| 00:00:11 |
| 2 | NESTED LOOPS | | 3 | 11460 | 805 (1)| 00:00:10 |
| 3 | TABLE ACCESS FULL | CUST_ORDER_TBL | 1 | 3777 | 3 (0)| 00:00:01 |
|* 4 | INDEX RANGE SCAN | SYS_IOT_TOP_774117 | 3 | 129 | 1 (0)| 00:00:01 |
| 5 | COLLECTION ITERATOR PICKLER FETCH| XMLSEQUENCEFROMXMLTYPE | | | | |
Predicate Information (identified by operation id):
4 - access("NESTED_TABLE_ID"="CUST_ORDER_TBL"."SYS_NC0000900010$")
filter("SYS_NC_TYPEID$" IS NOT NULL)
Note
- dynamic sampling used for this statementOn 10.2.0.3:
Execution Plan
Plan hash value: 1048233240
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 17 | 132K| 839 (0)| 00:00:11 |
| 1 | NESTED LOOPS | | 17 | 132K| 839 (0)| 00:00:11 |
| 2 | MERGE JOIN CARTESIAN | | 17 | 131K| 805 (0)| 00:00:10 |
| 3 | TABLE ACCESS FULL | CUST_ORDER_TBL | 1 | 3781 | 3 (0)| 00:00:01 |
| 4 | BUFFER SORT | | 17 | 70839 | 802 (0)| 00:00:10 |
|* 5 | INDEX FAST FULL SCAN| SYS_IOT_TOP_56154 | 17 | 70839 | 802 (0)| 00:00:10 |
|* 6 | INDEX UNIQUE SCAN | SYS_IOT_TOP_56152 | 1 | 43 | 2 (0)| 00:00:01 |
|* 7 | INDEX RANGE SCAN | SYS_C006701 | 1 | | 0 (0)| 00:00:01 |
Predicate Information (identified by operation id):
5 - filter("SYS_NC_TYPEID$" IS NOT NULL)
6 - access("SYS_NTpzENS1H/RwSSC7TVzvlqmQ=="."NESTED_TABLE_ID"="SYS_NTnN5b8Q+8Txi9V
w5Ysl6x9w=="."SYS_NC0000600007$")
filter("SYS_NC_TYPEID$" IS NOT NULL AND
"NESTED_TABLE_ID"="CUST_ORDER_TBL"."SYS_NC0000900010$")
7 - access("SYS_NTpzENS1H/RwSSC7TVzvlqmQ=="."NESTED_TABLE_ID"="SYS_NTnN5b8Q+8Txi9V
w5Ysl6x9w=="."SYS_NC0000600007$")
Note
- dynamic sampling used for this statementCLEAN UP...
DROP TABLE CUST_ORDER_TBL purge;
exec dbms_xmlschema.deleteschema('http://xmlns.example.org/xsd/testcase.xsd'); -
Hi,
I have been trying to build a table in a BI Report that does the following my attempts so far have not work. What I would like to happen is to have a table that has 15 rows displayed even if there are not 15 line items and in the event of more than 15 line items I would then like the extra lines to rollover to the next page displaying 15 rows in the table even if the remainder of line items is not 15. The report generates output for multiple customers. Please could someone advise how I could do this?
Thank you,
MarkA method for soving this problem is described here:
http://oracle.anilpassi.com/xml-publisher-developing-reports-printed-on-pre-printed-stationary.html -
SELECT on XML DB Table works for Schema owner, not for Schema user
Hi,
We are working on Oracle 10.2.0.3 under HP-UX.
We get ORA-01031: Insufficient Privileges when trying to execute Query
on Oracle XMLDB Table by Schema User
Here are detailed steps:
1) We have 2 users: CDROWNER (Schema Owner)
CDRJAVA (Schema User)
2) login as CDROWNER and execute following:
3) Register 2 XSDs (Common is used by CorridorRate)
Common.xsd:
<?xml version="1.0" encoding="utf-8"?>
<!-- edited with XMLSpy v2008 sp1 (http://www.altova.com) by Kent Williamson (OOCL (USA) INC) -->
<xsd:schema xmlns="http://com.oocl.schema.tnm.agreementbuilder" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb" xmlns:tnm="http://com.oocl.schema.tnm" xmlns:common="http://com.oocl.schema.common" xmlns:fwd="http://com.oocl.frm.common.date.dto/" xmlns:customer="http://com.oocl.schema.customer" xmlns:eqm="http://com.oocl.schema.eqm" targetNamespace="http://com.oocl.schema.tnm.agreementbuilder" elementFormDefault="qualified" attributeFormDefault="unqualified" xdb:storeVarrayAsTable="true">
<xsd:complexType name="NamedCustomer_V1" xdb:SQLType="NAMED_CUSTOMER_T">
<xsd:annotation>
<xsd:documentation>Named customer for the quote</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="SAP_IDS" type="SAPIDCollection_V1" minOccurs="0" xdb:SQLName="SAP_IDS">
<xsd:annotation>
<xsd:documentation xml:lang="en">
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="BookingConditions" type="xsd:string" minOccurs="0" xdb:SQLName="BOOKING_CONDITIONS"/>
<xsd:element name="BLConditions" type="xsd:int" xdb:SQLName="BL_CONDITIONS"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="Attachment_V1" xdb:SQLType="ATTACHMENT_T">
<xsd:annotation>
<xsd:documentation>Quote attachment</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="Url" type="xsd:string" minOccurs="0" xdb:SQLName="ATTACH_URL"/>
<xsd:element name="Text" type="xsd:string" minOccurs="0" xdb:SQLName="ATTACH_TEXT"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="SentOfferingRecord_V1" xdb:SQLType="SENT_OFFERING_RECORD_T">
<xsd:annotation>
<xsd:documentation>Record of quote sending out to customer</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="TimeSent" type="xsd:string" minOccurs="0" xdb:SQLName="TIME_SENT"/>
<xsd:element name="UserName" type="xsd:string" minOccurs="0" xdb:SQLName="USER_NAME"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="QuoteFormatSettings_V1" xdb:SQLType="QUOTE_FMT_SETTINGS_T">
<xsd:annotation>
<xsd:documentation>Quote format setting specification</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="TemplateName" type="xsd:string" minOccurs="0" xdb:SQLName="TEMPLATE_NAME">
<xsd:annotation>
<xsd:documentation>predefined format template</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="OptionalContentIDs" type="StringWrapper_V1" minOccurs="0" maxOccurs="unbounded" xdb:SQLName="OPTIONAL_CONTENTS" xdb:SQLCollType="OPTIONAL_CONTENT_V">
<xsd:annotation>
<xsd:documentation>optional contents</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="StandardRemarkIDs" type="IDWrapper_V1" minOccurs="0" maxOccurs="unbounded" xdb:SQLName="STANDARD_REMARKS" xdb:SQLCollType="STANDARD_REMARK_V">
<xsd:annotation>
<xsd:documentation>standard remarks specified by each region/office</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="StandardDisclaimerID" type="ID_LongNumeric_V1" minOccurs="0" xdb:SQLName="STANDARD_DISCLAIMER">
<xsd:annotation>
<xsd:documentation>standard disclaimer specified by each region/office</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="ShowSurcharges" type="ShowSurchargeType_V1" xdb:SQLName="SHOW_SURCHARGES">
<xsd:annotation>
<xsd:documentation>specifies how surcharges are shown in the offering document, can be show prepaid only, collect only or all</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:simpleType name="SurchargeCode_V1">
<xsd:restriction base="xsd:string"/>
</xsd:simpleType>
<xsd:simpleType name="ShowSurchargeType_V1">
<xsd:annotation>
<xsd:documentation>Indicator for quote to show prepaid, collect or all surcharges</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="Prepaid"/>
<xsd:enumeration value="Collect"/>
<xsd:enumeration value="All"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="StandardRemarkAndDisclaimer_V1" xdb:SQLType="STD_REMARK_AND_DISCLAIMER_T">
<xsd:annotation>
<xsd:documentation>Region specific standard remark and disclaimer</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="Id" type="xsd:string" minOccurs="0" xdb:SQLName="STD_REMARK_ID"/>
<xsd:element name="Region" type="xsd:string" minOccurs="0" xdb:SQLName="STD_REMARK_REGION"/>
<xsd:element name="IsRemark" type="xsd:boolean" xdb:SQLName="IS_REMARK"/>
</xsd:sequence>
</xsd:complexType>
<!-- END Jianming Original XSD -->
<!-- -->
<!-- All Simple/Complex Types defined below have been copied from External XSD Files -->
<!-- -->
<!-- Complex Wrapper types are needed since 10.2 Oracle XMLDB does not support indexing unbounded simple types -->
<xsd:complexType name="GeoIDCollection_V1" xdb:SQLType="GEO_ID_COLLECTION_T">
<xsd:sequence>
<xsd:element name="IDWrappers" type="IDWrapper_V1" maxOccurs="unbounded" xdb:SQLName="GEO_ID_WRAPPERS" xdb:SQLCollType="GEO_ID_WRAPPER_V"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="IDWrapper_V1" xdb:SQLType="ID_WRAPPER_T">
<xsd:sequence>
<xsd:element name="Value" type="ID_LongNumeric_V1" xdb:SQLName="ID_VAL"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="OfficeCodeCollection_V1" xdb:SQLType="OFFICE_CODE_COLLECTION_T">
<xsd:sequence>
<xsd:element name="StringWrappers" type="StringWrapper_V1" maxOccurs="unbounded" xdb:SQLName="STRING_WRAPPERS" xdb:SQLCollType="OFFICE_CODE_V"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="SAPIDCollection_V1" xdb:SQLType="SAP_ID_COLLECTION_T">
<xsd:sequence>
<xsd:element name="StringWrappers" type="StringWrapper_V1" maxOccurs="unbounded" xdb:SQLName="STRING_WRAPPERS" xdb:SQLCollType="SAP_ID_V"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="ServiceLoopCodeCollection_V1" xdb:SQLType="SERVICE_LOOP_CODE_COLLECTION_T">
<xsd:sequence>
<xsd:element name="StringWrappers" type="StringWrapper_V1" maxOccurs="unbounded" xdb:SQLName="STRING_WRAPPERS" xdb:SQLCollType="SERVICE_LOOP_CODE_V"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="IncludedHSCodeCollection_V1" xdb:SQLType="INCLUDED_HS_CODE_COLLECTION_T">
<xsd:sequence>
<xsd:element name="StringWrappers" type="StringWrapper_V1" maxOccurs="unbounded" xdb:SQLName="STRING_WRAPPERS" xdb:SQLCollType="INCLUDED_HS_CODE_V"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="StringWrapper_V1" xdb:SQLType="STRING_WRAPPER_T">
<xsd:sequence>
<xsd:element name="Value" xdb:SQLName="STR_VAL">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="256"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<!-- Below copied from tnm.agreementbuilder:GuidelineRateReference_V1.xsd -->
<xsd:complexType name="GuidelineRateReference_V1">
<xsd:annotation>
<xsd:documentation>Represents a guideline rate containing an ocean rate and up to 4 inland/port arbitrary add-on rates</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="OutboundInlandRate1ID" type="ID_LongNumeric_V1" minOccurs="0">
<xsd:annotation>
<xsd:documentation>The first outbound inland rate. If present, the location of this rate is always the point of receipt. Otherwise the point of receipt is (one of) the Trunk origin(s). The over location must match with either OB2 Location or Trunk Origin (if OB2 is not present)</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="OutboundInlandRate2ID" type="ID_LongNumeric_V1" minOccurs="0">
<xsd:annotation>
<xsd:documentation>An optional outbound inland rate. If present, the location must match with the over location of OB1 and the over location of this rate must match with the origin of the Trunk.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="BaseRateID" type="ID_LongNumeric_V1">
<xsd:annotation>
<xsd:documentation>The BaseRate = trunk / ocean rate.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="InboundInlandRate1ID" type="ID_LongNumeric_V1" minOccurs="0">
<xsd:annotation>
<xsd:documentation>The inbound rate connecting to the destination of the trunk. If there is only one inbound rate (IB2 is not present), then this rate will have the final destination. </xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="InboundInlandRate2ID" type="ID_LongNumeric_V1" minOccurs="0">
<xsd:annotation>
<xsd:documentation>A second inbound rate which connects to the first inbound rate to arrive at a final destination.</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<!-- Below copied from tnm:AgreementID_V1.xsd -->
<xsd:simpleType name="AgreementID_V1">
<xsd:restriction base="xsd:string">
<xsd:maxLength value="20"/>
</xsd:restriction>
</xsd:simpleType>
<!-- Below copied from tnm:AgreementStatus_V1.xsd -->
<xsd:simpleType name="AgreementStatus_V1">
<xsd:annotation>
<xsd:documentation>Agreement Status, like filed, approve, terminated, amend</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="20"/>
<xsd:enumeration value="File"/>
<xsd:enumeration value="Filed"/>
<xsd:enumeration value="Approve"/>
<xsd:enumeration value="Terminated"/>
<xsd:enumeration value="New"/>
<xsd:enumeration value="Incomplete"/>
<xsd:enumeration value="Amend"/>
</xsd:restriction>
</xsd:simpleType>
<!-- Below copied from tnm:AgreementType_V1.xsd -->
<xsd:simpleType name="AgreementType_V1">
<xsd:annotation>
<xsd:documentation>Agreement type, like CSO, SC, AB</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="3"/>
<xsd:enumeration value="CSO">
<xsd:annotation>
<xsd:documentation>Customized Service Offering</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="RA">
<xsd:annotation>
<xsd:documentation>Rate Agreement</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="SVC">
<xsd:annotation>
<xsd:documentation>Service Agreement</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="SUR">
<xsd:annotation>
<xsd:documentation>Surcharge Agreement</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="SC">
<xsd:annotation>
<xsd:documentation>Service Contract</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="TSO">
<xsd:annotation>
<xsd:documentation>Territorial Customized Service Offering</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="TSA">
<xsd:annotation>
<xsd:documentation>Territorial Service Agreement</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="AB">
<xsd:annotation>
<xsd:documentation>Agreement Builder</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
</xsd:restriction>
</xsd:simpleType>
<!-- Below copied from tnm:TradeTerm_V1.xsd -->
<xsd:simpleType name="TradeTerm_V1">
<xsd:annotation>
<xsd:documentation>Trade term</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="10"/>
<xsd:enumeration value="FOB"/>
<xsd:enumeration value="CIF"/>
</xsd:restriction>
</xsd:simpleType>
<!-- MODIFIED ABDateTime_V1 to be a simpleType of xsd:dateTime for DB storage -->
<xsd:simpleType name="ABDateTime_V1">
<xsd:restriction base="xsd:dateTime"/>
</xsd:simpleType>
<!-- Below copied from common:PersonName_V1.xsd -->
<xsd:complexType name="PersonName_V1" xdb:SQLType="PERSON_NAME_T">
<xsd:sequence>
<xsd:element name="FirstName" minOccurs="0" xdb:SQLName="FIRST_NAME">
<xsd:simpleType>
<xsd:restriction base="xsd:string"/>
</xsd:simpleType>
</xsd:element>
<xsd:element name="LastName" minOccurs="0" xdb:SQLName="LAST_NAME">
<xsd:simpleType>
<xsd:restriction base="xsd:string"/>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<!-- Below copied from common:EmailAddress_V1.xsd -->
<xsd:complexType name="EmailAddress_V1" xdb:SQLType="EMAIL_ADDRESS_T">
<xsd:sequence>
<xsd:annotation>
<xsd:documentation>
A common Type for EmailAddress.
</xsd:documentation>
</xsd:annotation>
<xsd:element name="EmailID" type="xsd:string" xdb:SQLName="EMAIL_ID"/>
<xsd:element name="EmailType" type="EmailType_V1" default="Unspecified" xdb:SQLName="EMAIL_TYPE"/>
</xsd:sequence>
</xsd:complexType>
<xsd:simpleType name="EmailType_V1">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="Home"/>
<xsd:enumeration value="Work"/>
<xsd:enumeration value="Unspecified"/>
</xsd:restriction>
</xsd:simpleType>
<!-- Below copied from common:PhoneNumberType_V1.xsd.xsd -->
<xsd:simpleType name="PhoneNumberType_V1">
<xsd:annotation>
<xsd:documentation xml:lang="en">
Type refers to the contact number type associated to the contact number.
May include: Business Phone/Fax, Home Phone/Fax, Mobile Phone, Pager, Telex or Unspecified.
</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="BusinessPhone"/>
<xsd:enumeration value="HomePhone"/>
<xsd:enumeration value="BusinessFax"/>
<xsd:enumeration value="HomeFax"/>
<xsd:enumeration value="MobilePhone"/>
<xsd:enumeration value="Pager"/>
<xsd:enumeration value="Telex"/>
<xsd:enumeration value="Unspecified"/>
</xsd:restriction>
</xsd:simpleType>
<!-- Below copied from common:PhoneNumber_V1.xsd -->
<xsd:complexType name="PhoneNumber_V1" xdb:SQLType="PHONE_NUMBER_T">
<xsd:annotation>
<xsd:documentation xml:lang="en">
PhoneNumber is a common type that defines generic structure of a phone number object.
</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="CountryCode" type="xsd:string" minOccurs="0" xdb:SQLName="COUNTRY_CODE">
<xsd:annotation>
<xsd:documentation xml:lang="en">
CountryCode holds on the country code value.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="AreaCode" type="xsd:string" minOccurs="0" xdb:SQLName="AREA_CODE">
<xsd:annotation>
<xsd:documentation xml:lang="en">
AreaCode holds on the area code value.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="Number" type="xsd:string" xdb:SQLName="PHONE_NUMBER">
<xsd:annotation>
<xsd:documentation xml:lang="en">
Number holds on the number value.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="Extension" type="xsd:string" minOccurs="0" xdb:SQLName="PHONE_EXTN">
<xsd:annotation>
<xsd:documentation xml:lang="en">
Extension holds on the phone number extension, if applicable
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="Type" type="PhoneNumberType_V1" default="Unspecified" xdb:SQLName="PHONE_NUM_TYPE">
<xsd:annotation>
<xsd:documentation xml:lang="en">
Type refers to the contact number type associated to the contact number.
May include: Business Phone/Fax, Home Phone/Fax, Mobile Phone, Pager, Telex or Unspecified
Default value is Unspecified.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<!-- Below copied from common:ContactInformation_V1.xsd -->
<xsd:complexType name="ContactInformation_V1" xdb:SQLType="CONTACT_INFORMATION_T">
<xsd:sequence>
<xsd:element name="Name" type="PersonName_V1" minOccurs="0" xdb:SQLName="CONTACT_NAME"/>
<xsd:element name="EmailAddresses" type="EmailAddress_V1" minOccurs="0" maxOccurs="unbounded" xdb:SQLName="EMAIL_ADDRESSES" xdb:SQLCollType="EMAIL_ADDRESS_V"/>
<xsd:element name="PhoneNumbers" type="PhoneNumber_V1" minOccurs="0" maxOccurs="unbounded" xdb:SQLName="PHONE_NUMBERS" xdb:SQLCollType="PHONE_NUMBER_V"/>
</xsd:sequence>
</xsd:complexType>
<!-- Below copied from common:CardinalDirection_V1.xsd -->
<xsd:simpleType name="CardinalDirectionName_V1">
<xsd:annotation>
<xsd:documentation>A list of voyage name direction.</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="North"/>
<xsd:enumeration value="South"/>
<xsd:enumeration value="East"/>
<xsd:enumeration value="West"/>
</xsd:restriction>
</xsd:simpleType>
<!-- Below copied from common:CommonRestrictions_V1.xsd -->
<xsd:simpleType name="ID_LongNumeric_V1">
<xsd:annotation>
<xsd:documentation>Represents Identifier using long as the restriction - with max - 15 digits</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:long"/>
</xsd:simpleType>
<!-- Below copied from common:ServiceLoopCode_V1.xsd -->
<xsd:simpleType name="ServiceLoopCode_V1">
<xsd:annotation>
<xsd:documentation>A simple type that holds on to the service loop code.</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="4"/>
</xsd:restriction>
</xsd:simpleType>
<!-- Below copied from common:Currency_V1.xsd -->
<xsd:simpleType name="CurrencyCode_V1">
<xsd:annotation>
<xsd:documentation>A 3 digit currency code string (like USD)</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:string">
<xsd:length value="3"/>
</xsd:restriction>
</xsd:simpleType>
<!-- Below copied from tnm:TariffCode_V1.xsd -->
<xsd:simpleType name="TariffCode_V1">
<xsd:annotation>
<xsd:documentation>tariff code that uniquely identify a tariff</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:string">
<xsd:length value="3"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="Global_UUID_V1">
<xsd:annotation>
<xsd:documentation>This is to represent the largest UUID format in the domain. Max. length is 36.</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="36"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="UUID_V1">
<xsd:annotation>
<xsd:documentation>A system generated uuid in string format. Max. length is 20.</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="Global_UUID_V1">
<xsd:maxLength value="20"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="CustomerContactRoleType_V1">
<xsd:restriction base="xsd:string">
<xsd:maxLength value="20"/>
<xsd:enumeration value="Accounting"/>
<xsd:enumeration value="Booking"/>
<xsd:enumeration value="Booking_CS"/>
<xsd:enumeration value="Documentation"/>
<xsd:enumeration value="General"/>
<xsd:enumeration value="Operations"/>
<xsd:enumeration value="Pricing"/>
<xsd:enumeration value="Sales"/>
<xsd:enumeration value="Sales_SMM"/>
<xsd:enumeration value="Warehouse"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="TradeCode_V1">
<xsd:annotation>
<xsd:documentation>A simple type that holds on to the trade code.</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="3"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="ShipmentBoundCode_V1">
<xsd:annotation>
<xsd:documentation>A list of shipment bound code.</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="IB"/>
<xsd:enumeration value="OB"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="CustomerContactSpecification_V1" xdb:SQLType="CUST_CONTACT_SPEC_T">
<xsd:sequence>
<xsd:element name="ContactSpecUUID" type="UUID_V1" xdb:SQLName="CONTACT_SPEC_UUID"/>
<xsd:element name="ContactUUID" type="UUID_V1" xdb:SQLName="CONTACT_UUID"/>
<xsd:element name="Role" type="CustomerContactRoleType_V1" xdb:SQLName="CONTACT_ROLE"/>
<xsd:element name="SAP_ID" type="SAP_ID_V1" minOccurs="0" xdb:SQLName="CUST_SAP_ID"/>
<xsd:element name="TradeCode" type="TradeCode_V1" minOccurs="0" xdb:SQLName="TRADE_CODE"/>
<xsd:element name="TradeLaneCode" type="TradeLaneCode_V1" minOccurs="0" xdb:SQLName="TRADE_LANE_CODE"/>
<xsd:element name="ServiceLoopCode" type="ServiceLoopCode_V1" minOccurs="0" xdb:SQLName="SERVICE_LOOP_CODE"/>
<xsd:element name="ShipmentBoundCode" type="ShipmentBoundCode_V1" minOccurs="0" xdb:SQLName="SHIPMENT_BOUND_CODE"/>
<xsd:element name="CommodityGroupCode" type="AlphaCode_V1" minOccurs="0" xdb:SQLName="COMMODITY_GROUP_CODE"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CustomerContact_V1" xdb:SQLType="CUSTOMER_CONTACT_T">
<xsd:annotation>
<xsd:documentation xml:lang="en">
This defines a contact for a Customer. A customer contact is someone to whom an OOCL sales representative communicates regarding business transactions between OOCL and the Customer.
</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="ContactUUID" type="UUID_V1" xdb:SQLName="CONTACT_UUID"/>
<xsd:element name="ContactInformation" type="ContactInformation_V1" xdb:SQLName="CONTACT_INFORMATION"/>
<xsd:element name="SAP_ID" type="SAP_ID_V1" minOccurs="0" xdb:SQLName="SAP_ID"/>
<xsd:element name="Title" minOccurs="0" xdb:SQLName="TITLE">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="35"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="JobTitle" minOccurs="0" xdb:SQLName="JOB_TITLE">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="35"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="Department" minOccurs="0" xdb:SQLName="DEPARTMENT">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="35"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="Specifications" type="CustomerContactSpecification_V1" minOccurs="0" maxOccurs="unbounded" xdb:SQLName="CUST_CONTACT_SPECS" xdb:SQLCollType="CUST_CONTACT_SPEC_V"/>
</xsd:sequence>
</xsd:complexType>
<!-- Below copied from tnm:TradeLaneCode_V1.xsd -->
<xsd:simpleType name="TradeLaneCode_V1">
<xsd:annotation>
<xsd:documentation>A simple type that holds on to the trade lane code.</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="3"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="CompanyName_V1">
<xsd:annotation>
<xsd:documentation>Name of a Company
This is used to denote the information about an organization which may not be a Customer</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="105"/>
<xsd:minLength value="1"/>
</xsd:restriction>
</xsd:simpleType>
<!-- Below copied from CorridorBaseRate_V1.xsd -->
<xsd:complexType name="CorridorBaseRate_V1" xdb:SQLType="CORRIDOR_BASE_RATE_T">
<xsd:annotation>
<xsd:documentation>Corridor base rate specifications</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="SizeType" type="xsd:string" minOccurs="0" xdb:SQLName="SIZE_TYPE">
<xsd:annotation>
<xsd:documentation>container sise and type that the rate is applicable</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="Amount" type="xsd:decimal" minOccurs="0" xdb:SQLName="BASE_RATE_AMOUNT">
<xsd:annotation>
<xsd:documentation>charge amount</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="Currency" type="CurrencyCode_V1" minOccurs="0" xdb:SQLName="BASE_RATE_CURRENCY">
<xsd:annotation>
<xsd:documentation>charge currency code</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="OfferType" minOccurs="0" xdb:SQLName="OFFER_TYPE">
<xsd:annotation>
<xsd:documentation>offer type: either OOCL offered or customer requested</xsd:documentation>
</xsd:annotation>
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:length value="4"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="IsSOC" type="xsd:boolean" minOccurs="0" xdb:SQLName="IS_SOC">
<xsd:annotation>
<xsd:documentation>indicator for shipper owned container</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="EffectiveFrom" type="ABDateTime_V1" minOccurs="0" xdb:SQLName="EFFECTIVE_FROM" xdb:SQLType="TIMESTAMP">
<xsd:annotation>
<xsd:documentation>effectime start time of the rate</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="EffectiveTo" type="ABDateTime_V1" minOccurs="0" xdb:SQLName="EFFECTIVE_TO" xdb:SQLType="TIMESTAMP">
<xsd:annotation>
<xsd:documentation>effectime end time of the rate</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="TransitTime" type="xsd:string" minOccurs="0" xdb:SQLName="TRANSIT_TIME">
<xsd:annotation>
<xsd:documentation>transit time of shipment that the rate offered</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:simpleType name="SAP_ID_V1">
<xsd:annotation>
<xsd:documentation xml:lang="en">
SAP ID is the unique identifier for a given Customer in reference to SAP Application.
</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="10"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="ABShippingParty_V1" xdb:SQLType="AB_SHIPPING_PARTY_T">
<xsd:annotation>
<xsd:documentation>Customer's roles in a shipment, like shipper, consignee, etc</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="CustomerHolder" type="CustomerHolder_V1" xdb:SQLName="CUSTOMER_HOLDER"/>
<xsd:element name="ShippingRoleGroupID" type="ID_Integer_V1" minOccurs="0" xdb:SQLName="SHIPPING_ROLE_GROUP_ID"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CustomerHolder_V1" xdb:SQLType="CUSTOMER_HOLDER_T">
<xsd:annotation>
<xsd:documentation>A place holder where a new customer was created or modified in agreement builder</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="SAP_ID" type="SAP_ID_V1" minOccurs="0" xdb:SQLName="SAP_ID">
<xsd:annotation>
<xsd:documentation>Customer SapID if it is an existing customer</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="Name" type="CompanyName_V1" minOccurs="0" xdb:SQLName="COMPANY_NAME">
<xsd:annotation>
<xsd:documentation>New customer name that is created during agreement builder creation(customer does not exist in NewCPF)</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="ModifiedContacts" type="CustomerContact_V1" minOccurs="0" maxOccurs="unbounded" xdb:SQLName="MODIFIED_CONTACTS" xdb:SQLCollType="MODIFIED_CONTACT_V"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="ShippingPartyRoleGroup_V1" xdb:SQLType="SHIPPING_PARTY_ROLE_GROUP_T">
<xsd:annotation>
<xsd:documentation>All customer's shipping role in an agreement</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="GroupID" type="ID_Integer_V1" minOccurs="0" xdb:SQLName="GROUP_ID"/>
<xsd:element name="IsShipper" type="xsd:boolean" xdb:SQLName="IS_SHIPPER"/>
<xsd:element name="IsConsignee" type="xsd:boolean" xdb:SQLName="IS_CONSIGNEE"/>
<xsd:element name="IsForwarder" type="xsd:boolean" xdb:SQLName="IS_FORWARDER"/>
<xsd:element name="IsControlParty" type="xsd:boolean" xdb:SQLName="IS_CONTROL_PARTY"/>
<xsd:element name="IsSignatureParty" type="xsd:boolean" xdb:SQLName="IS_SIGNATURE_PARTY"/>
<xsd:element name="IsNotifyParty" type="xsd:boolean" xdb:SQLName="IS_NOTIFY_PARTY"/>
<xsd:element name="IsAssociate" type="xsd:boolean" xdb:SQLName="IS_ASSOCIATE"/>
</xsd:sequence>
</xsd:complexType>
<xsd:simpleType name="AlphaCode_V1">
<xsd:annotation>
<xsd:documentation>Code of a CommodityReportGroup. The Business Community refers to this 3 digit code as the AlphaCode
</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="3"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="CargoNatureCode_V1">
<xsd:annotation>
<xsd:documentation>The classification code of cargo for special stowage arrangement</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="2"/>
<xsd:enumeration value="AW">
<xsd:annotation>
<xsd:documentation>Awkward</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="DG">
<xsd:annotation>
<xsd:documentation>Dangerous</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="GC">
<xsd:annotation>
<xsd:documentation>GeneralCargo</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="RF">
<xsd:annotation>
<xsd:documentation>Reefer</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="ID_Integer_V1">
<xsd:annotation>
<xsd:documentation>Represents Identifier using Integer as the restriction.</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:int"/>
</xsd:simpleType>
<xsd:complexType name="CorridorVolume_V1" xdb:SQLType="CORRIDOR_VOLUME_T">
<xsd:annotation>
<xsd:documentation>Corridor volumns associated with corridor base rate</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="ID" type="xsd:int" xdb:SQLName="IDNUM">
<xsd:annotation>
<xsd:documentation>A numeric identifier which identifies a CorridorVolume only in the context of a Quote/Agreement</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="SizeType" type="xsd:string" minOccurs="0" xdb:SQLName="SIZE_TYPE">
<xsd:annotation>
<xsd:documentation>container sise and type that the rate is applicable</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="Volume" type="ShipmentVolume_V1" minOccurs="0" xdb:SQLName="VOLUME">
<xsd:annotation>
<xsd:documentation>corridor rate volume specification</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="VolumePatterns" type="VolumePattern_V1" minOccurs="0" maxOccurs="unbounded" xdb:SQLName="VOLUME_PATTERNS" xdb:SQLCollType="VOLUME_PATTERN_V">
<xsd:annotation>
<xsd:documentation>detailed volume sepecification</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="Basis" type="xsd:string" minOccurs="0" xdb:SQLName="BASIS"/>
<xsd:element name="IsConditionOfRate" type="xsd:boolean" xdb:SQLName="IS_CONDITION_OF_RATE">
<xsd:annotation>
<xsd:documentation>indicate if the volume sepecification is a condition of the corridor rate</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="IsShared" type="xsd:boolean" xdb:SQLName="IS_SHARED">
<xsd:annotation>
<xsd:documentation>Indicates if the volume group is shared by more than one corridor rate. When true, sizetype should be null</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="IsForEntireAgreement" type="xsd:boolean" xdb:SQLName="IS_FOR_AGREEMENT"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="VolumePattern_V1" xdb:SQLType="VOLUME_PATTERN_T">
<xsd:annotation>
<xsd:documentation>Agreement volume pattern</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="Volume" type="ShipmentVolume_V1" minOccurs="0" xdb:SQLName="VOLUME">
<xsd:annotation>
<xsd:documentation>volume amount</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="Period" type="xsd:string" minOccurs="0" xdb:SQLName="PERIOD">
<xsd:annotation>
<xsd:documentation>time period for the volume</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="ShipmentVolume_V1" xdb:SQLType="SHIPMENT_VOLUME_T">
<xsd:annotation>
<xsd:documentation>A measurement for shipment volume</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="Unit" type="xsd:string" minOccurs="0" xdb:SQLName="UNIT"/>
<xsd:element name="Value" type="xsd:decimal" minOccurs="0" xdb:SQLName="VALUE"/>
</xsd:sequence>
</xsd:complexType>
<!-- END Simple/Complex Types copied from External XSD Files -->
</xsd:schema>
CorridorRate.xsd
<?xml version="1.0" encoding="utf-8"?>
<!-- edited with XMLSpy v2007 rel. 3 (http://www.altova.com) by Auroprem Kandaswami (OOCL (USA) INC) -->
<xsd:schema xmlns="http://com.oocl.schema.tnm.agreementbuilder" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb" xmlns:tnm="http://com.oocl.schema.tnm" xmlns:common="http://com.oocl.schema.common" xmlns:fwd="http://com.oocl.frm.common.date.dto/" xmlns:customer="http://com.oocl.schema.customer" xmlns:eqm="http://com.oocl.schema.eqm" targetNamespace="http://com.oocl.schema.tnm.agreementbuilder" elementFormDefault="qualified" attributeFormDefault="unqualified" xdb:storeVarrayAsTable="true">
<xsd:include schemaLocation="AB_Common_V1_XMLDB.xsd"/>
<xsd:element name="CorridorRate" type="CorridorRate_V1" nillable="true" xdb:SQLName="CORRIDOR_RATE"/>
<!-- Below copied from common:DeliveryMode_V1.xsd -->
<xsd:simpleType name="DeliveryMode_V1">
<xsd:annotation>
<xsd:documentation>2 char string representing the delivery mode associated with the rate. YY for example is a Container Yard to Container Yard move, whereas DD is a door to door move.</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="2"/>
<xsd:minLength value="2"/>
<xsd:enumeration value="YY"/>
<xsd:enumeration value="YD"/>
<xsd:enumeration value="DY"/>
<xsd:enumeration value="DD"/>
</xsd:restriction>
</xsd:simpleType>
<!-- Below copied from PaymentTerm_V1.xsd -->
<xsd:simpleType name="PaymentTerm_V1">
<xsd:annotation>
<xsd:documentation>Payment term, either prepaid or collect</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="10"/>
<xsd:enumeration value="Prepaid"/>
<xsd:enumeration value="Collect"/>
</xsd:restriction>
</xsd:simpleType>
<!-- Below copied from CorridorMetric_V1.xsd -->
<xsd:complexType name="CorridorMetric_V1" xdb:SQLType="CORRIDOR_METRIC_T">
<xsd:annotation>
<xsd:documentation>Corridor metrics associated with corridor base rate</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="SizeType" type="xsd:string" minOccurs="0" xdb:SQLName="SIZE_TYPE">
<xsd:annotation>
<xsd:documentation>container sise and type that the rate is applicable</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="VolumeSRG" type="xsd:string" minOccurs="0" xdb:SQLName="VOLUME_SRG">
<xsd:annotation>
<xsd:documentation>guideline volume</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="AgreementSRG" type="xsd:string" minOccurs="0" xdb:SQLName="AGREEMENT_SRG">
<xsd:annotation>
<xsd:documentation>ageeement volume</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="ContributionNRPO" type="xsd:string" minOccurs="0" xdb:SQLName="CONTRIBUTION_NRPO">
<xsd:annotation>
<xsd:documentation>contribution matrix NRPO</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="ContributionRPO" type="xsd:string" minOccurs="0" xdb:SQLName="CONTRIBUTION_RPO">
<xsd:annotation>
<xsd:documentation>contribution matrix RPO</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="AverageRate" type="xsd:string" minOccurs="0" xdb:SQLName="AVERAGE_RATE">Thanks so much for your response - Prefixing the call to the table within the package, with the schema owner does indeed solve the problem. Since this is a Production issue, i have implemented this fix in my customer's database.
However, I would still like this issue permanently resolved. The next time we send out updated package code, this will happen again (unless we then fix it again). I'd still like info from anyone on what exactly must be done to allow the call within the package to work without specifically pre-fixing the table's schema owner. It shouldn't be needed... The DB link is connecting via the same schema on database B that owns the table in question.
pre-fixing the schema owner is something we don't do in our sql statements, and this has worked fine for many of our cusomer's environments. We're only seeing this issue on one environment. -
Converting XML as table to XML as string
All,
I am successfully able to convert XML table from Internal Table. Now, I would like to convert this XML Table into XML string.
Any help on this will be appreciated.
Regards,
Salil
Moderator message: please search for available information/documentation before asking.
Edited by: Thomas Zloch on Dec 7, 2010 11:57 AMHowdy,
CONCATENATE LINES OF lt_table into l_string SEPARATED BY cl_abap_char_utilities=>cr_lf.
This will create a string of the lines of the internal table with a carriage return after each line.
Cheers
Alex -
XSLT to convert XML into Tables
Hi,
I'm trying to import my XML data into a table format. After adding an XSL file to my Structure Application as a Preprocessing Stylesheet, and importing my XML instance file with the Template file opened, the "Unknown File Type" error window appeared asking for a file format to Convert From. Picking any one doesn't create a table.
The XSL file tranforms the XML data into an HTML file that has a table with columns corresponding to the XML data. I was thinking using that type of XSL because it renders tables.
Below is the XSL markup:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<body>
<h2>Products</h2>
<table border="1">
<tr bgcolor="#9acd32">
<th>Title</th>
<th>Number</th>
<th>Date</th>
</tr>
<xsl:for-each select="Products/Product">
<tr>
<td><xsl:value-of select="Title"/></td>
<td><xsl:value-of select="Number"/></td>
<td><xsl:value-of select="Date"/></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
Title, Number, and Date are child elements of the Product element, which is a child element of the Products root element in my XML file.
Am I applying the stylesheet correctly here? Am I using the write kind of stylesheet?
Thanks,
zebHi Michael, Van,
Thank you for responding to my post. Your feedback was very helpful!
I was able to get the table to generate in FrameMaker but no data from the XML file is flowing into it. All that appears is the header row with "Title," "Number," and "Date" in the cells, and a row with blank cells underneath it. The Structure View pane has a red "<no value>" for the "Cols" and "Widths" attributes of the Table element. Only the Title column is affected by the width value.
The XSL, RW, and EDD files are as a follows: (The structure for the XML is a "Products" root element with mulitple "Product" child elements that each have a "Title," "Name," "Date" child element.)
==========================XSL==================
<xsl:stylesheet version='1.0' xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" doctype-system="products_DTD3.dtd" />
<xsl:template match="/">
<products>
<Table cols="3" width="150">
<TableHeading>
<TableRow>
<TableCell>Title</TableCell>
<TableCell>Number</TableCell>
<TableCell>Date</TableCell>
</TableRow>
</TableHeading>
<TableBody>
<TableRow>
<TableCell><xsl:for-each select="Products/Product"><xsl:value-of select="Title"/></xsl:for-each></TableCell>
<TableCell><xsl:for-each select="Products/Product"><xsl:value-of select="Number"/></xsl:for-each></TableCell>
<TableCell><xsl:for-each select="Products/Product"><xsl:value-of select="Date"/></xsl:for-each></TableCell>
</TableRow>
</TableBody>
</Table>
</products>
</xsl:template>
</xsl:stylesheet>
==========================EDD==================
Element (Container): products
General rule: Table
Valid as the highest-level element.
Element (Table): Table
General rule: TableHeading,TableBody
Attribute list
Name: cols String Required
Name: width String Required
Element (Table Heading): TableHeading
General rule: TableRow
Element (Table Row): TableRow
General rule: TableCell+
Element (Table Cell): TableCell
General rule: <TEXT>
Element (Table Body): TableBody
General rule: TableRow
==========================RW===================
fm version is "10.0";
element "Table" {
is fm table element;
attribute "cols" is fm property columns;
attribute "width" is fm property column widths;
element "TableRow" is fm table row element;
element "TableHeading" is fm table heading element;
element "TableBody" is fm table body element;
element "TableCell" is fm table cell element;
===============================================
I'm having trouble placing the "<xsl:for-each select="Products/Product">" tag in the XSL file. When I put it under TRow, FrameMaker gives an error that "TRow is not a valid for content (TCell)+". Only when I place it within the TCell tags (as I have above) does the above-mentioned Table with a Header row and a row with empty cells generate.
Is the XSL the problem here?
Thanks,
Zeb -
XML into table: Why do all my insert values are NULL?
Hello,
I'm pretty new in XML ... then I still learn a lot by myself !!!
I surfed to a lot of forums and examples ....
I have a XML file. I built a XSL file in order to insert a part of my XML file into a table.
The 2 files are loaded as CLOB into a DB table.
I wrote a PLSQL procedure for this job.
We are on a DB 10gR2.
As a result, all the inserted columns are loaded with NULL !!!! ....
I must have done something wrong ... for sure !!! but I cannot figure out.
Here are the files and procedures:
*<?xml version="1.0" ?>*
*<purchaseOrder orderDate="1999-10-20">*
*<shipTo country="US">*
*<name>Alice Smith</name>*
*<street>123 Maple Street</street>*
*<city>Mill Valley</city>*
*<state>CA</state>*
*<zip>90952</zip>*
*</shipTo>*
*<billTo country="US">*
*<name>Robert Smith</name>*
*<street>8 Oak Avenue</street>*
*<city>Old Town</city>*
*<state>PA</state>*
*<zip>95819</zip>*
*</billTo>*
*<comment>Hurry, my lawn is going wild!</comment>*
*<items>*
*<item partNum="872-AA">*
*<productName>Lawnmower</productName>*
*<quantity>1</quantity>*
*<USPrice>148.95</USPrice>*
*<comment>Confirm this is electric</comment>*
*</item>*
*<item partNum="926-AA">*
*<productName>Baby Monitor</productName>*
*<quantity>1</quantity>*
*<USPrice>39.98</USPrice>*
*<shipDate>1999-05-21</shipDate>*
*</item>*
*</items>*
*</purchaseOrder>*
The XLS file is :
*<?xml version="1.0"?>*
*<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">*
*<xsl:output method="xml" media-type="text/xml" />*
*<xsl:template match="/">*
*<insert>*
*<Table>*
*<xsl:attribute name="source">*
*<xsl:value-of select="'item_club'" />*
*<!--layer=Default-->*
*</xsl:attribute>*
*<Columns>*
*<Column>*
*<xsl:attribute name="source">*
*<xsl:value-of select="'item_code'" />*
*<!--layer=Default-->*
*</xsl:attribute>*
*</Column>*
*<Column>*
*<xsl:attribute name="source">*
*<xsl:value-of select="'item_name'" />*
*<!--layer=Default-->*
*</xsl:attribute>*
*</Column>*
*<Column>*
*<xsl:attribute name="source">*
*<xsl:value-of select="'item_price'" />*
*<!--layer=Default-->*
*</xsl:attribute>*
*</Column>*
*</Columns>*
*<xsl:for-each select="purchaseOrder/items">*
*<Rowset>*
*<xsl:for-each select="item">*
*<Row>*
*<Column>*
*<xsl:attribute name="source">*
*<xsl:value-of select="'item_code'" />*
*<!--layer=Default-->*
*</xsl:attribute>*
*<xsl:value-of select="@partNum" />*
*<!--layer=Default-->*
*</Column>*
*<Column>*
*<xsl:attribute name="source">*
*<xsl:value-of select="'item_name'" />*
*<!--layer=Default-->*
*</xsl:attribute>*
*<xsl:value-of select="productName" />*
*<!--layer=Default-->*
*</Column>*
*<Column>*
*<xsl:attribute name="source">*
*<xsl:value-of select="'item_price'" />*
*<!--layer=Default-->*
*</xsl:attribute>*
*<xsl:value-of select="USPrice" />*
*<!--layer=Default-->*
*</Column>*
*</Row>*
*</xsl:for-each>*
*<!--layer=Default-->*
*</Rowset>*
*</xsl:for-each>*
*<!--layer=Default-->*
*</Table>*
*</insert>*
*</xsl:template>*
*</xsl:stylesheet>*
*<!--xsl-easyControl - (C) 2003-2007 SoftProject GmbH-->*
*<!--Source: "purchaseOrder_clubDev.xml"|Type:"xml"-->*
*<!--Destination: "Connexion_XSL_SCFOX.xac"|Type:"Connexion_XSL_SCFOX"-->*
*<!--Document type: Input Driven-->*
The XML files are successfully inserted into a CLOB colum :
ID FILENAME XML
24 item_club.xsl <?xml version="1.0"?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.or
25 purchaseOrder.xml <?xml version="1.0" ?> <purchaseOrder orderDate="1999-10-20">
And the procedure is :
CREATE OR REPLACE PROCEDURE load_xml( p_dir IN VARCHAR2
, p_filename IN VARCHAR2) AS
insCtx DBMS_XMLSave.ctxType;
rows NUMBER;
l_bfile BFILE := BFILENAME(p_dir, p_filename);
l_clob CLOB;
l_bfile_xsl BFILE;
l_clob_xsl CLOB;
begin
dbms_output.put_line('p_filename='||p_filename);
insCtx := DBMS_XMLSave.newContext('sipmo.item_club'); -- get the save context..!
dbms_output.put_line('item_club.xsl context='||insCtx);
--IMPORTANT... ignore la casse
DBMS_XMLSave.setIgnoreCase(insCtx, 1);
--select XSL file item_club.xsl
l_bfile_xsl := BFILENAME(p_dir, 'item_club.xsl');
DBMS_LOB.createtemporary (l_clob_xsl, TRUE);
DBMS_LOB.fileopen( l_bfile_xsl, DBMS_LOB.file_readonly);
DBMS_LOB.loadfromfile( l_clob_xsl, l_bfile_xsl, DBMS_LOB.getlength(l_bfile_xsl));
dbms_output.put_line('item_club.xsl length='||DBMS_LOB.getlength(l_bfile_xsl));
DBMS_LOB.fileclose(l_bfile_xsl);
DBMS_XMLSave.SETXSLT(insCtx, l_clob_xsl);
dbms_output.put_line('step 10');
DBMS_XMLSave.clearUpdateColumnList(insCtx); -- clear the update settings
DBMS_XMLSave.setUpdateColumn(insCtx,'ITEM_CODE');
DBMS_XMLSave.setUpdateColumn(insCtx,'ITEM_NAME');
DBMS_XMLSave.setUpdateColumn(insCtx,'ITEM_PRICE');
-- Now insert into the table
dbms_output.put_line('step 90');
rows := DBMS_XMLSave.insertXML(insCtx, l_clob);
dbms_output.put_line('step 100 rows='||rows);
DBMS_XMLSave.closeContext(insCtx);
DBMS_LOB.freetemporary (l_clob_xsl);
DBMS_LOB.freetemporary (l_clob);
END;
The result table is like this :
scfx>select * from item_club;
ITEM_CODE ITEM_NAME ITEM_PRICE
All the columns of each row are NULL !!!
Why?
Do you have any advice ?
Thanks if advance,
OlivierSo, if I understand what you mean ... I should write something like this :
insert into item_club
select t2.partnum, t2.productname, to_number(replace(t2.usprice, '.', ','))
from odab_xml_tab t
, xmltable('*' passing t.xml.extract('purchaseOrder/items/*')
columns partNum varchar2(35) path '@partNum'
, productName varchar2(35) path 'productName'
, USPrice varchar2(35) path 'USPrice'
) t2
Its a change in our code.. but that looks nice !!!
Thanks,
Olivier -
XML to table mapping in oracle database
Hi,
I am having 2 modules in my application:
First module takes the XML file, parse it, fetches data, creates a table in database and stores the data into that table.
Second module does vice versa. it takes a table, retrives data and write out an XML file.
In first module I use DOM parser. But I want to use Oracle XSU for the second module. But it seems that I can not use oracle XSU and DOM togather.
when I include xmlparserv2.jar in class path I can not run my first module.
Is it possible that I can use dom for first module and XSU for second module?
It gives me error like ..
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: oracle/xml/parser/v2/XMLText
at oracle.xml.parser.v2.NonValidatingParser.<init>(NonValidatingParser.java:139)
at oracle.xml.parser.v2.XMLParser.<init>(XMLParser.java:122)
at oracle.xml.parser.v2.DOMParser.<init>(DOMParser.java:82)
at oracle.xml.jaxp.JXDocumentBuilder.<init>(JXDocumentBuilder.java:71)
at oracle.xml.jaxp.JXDocumentBuilderFactory.newDocumentBuilder(JXDocumentBuilderFactory.java:72)
BUT if I remove xmlparserv2.jar from classpath then it works fine...
I would really appreciate if anyone can throw light ...
Thanks in advance
rpHi,
I had somewhat a similar problem.
Did you use oracle.xdb.XMLType.getDOM()?
getDOM() needs xmlparserv2.jar, which only provides a DOM implementation that is DOM 1.0 and Core 2.0 compliant.
In my case, when I used DOM 3.0 methods in org.w3c.dom, I ran into the "method not found" type of error.
My solution was to use the DocumentBuilder that comes with the JDK to create the DOM instance in the code.
P.
Maybe you are looking for
-
SQL SERVER 2012 Installed to SMB share Error 59 (An unexpected network error occurred)
I have installed SQL 2012 on a clustered file share. When I try to add space to extend the log file for a database I get the following error Msg 5149, Level 16, State 3, Line 1 MODIFY FILE encountered operating system error 59(An unexpected network e
-
Flash Player 9 causing install
After updating to Flash Player 9 my Contribute users encounter their machines trying to install Controbute 3 anytime they use a Microsoft program. Has anyone else encountered this problem or know how to ix it?
-
Deleted "all my files" from CoreServices... how to restore?
This feature wasn't working and was displaying ghost files of things I deleted. This clogged the screen up so I couldnt get to the files I was looking for. So I went into the Finder's core service folder and deleted it. Now I can't figure out how to
-
How to install 10g database on windows with db block size 16k
Hi, Can somone help me install oracle 10g database on windows xp with db block size as 16k. i need this database, because it is one of the recommendations for insalling OWB(Oracle Warehouse Builder). Thanks, Philip.
-
Need help in installing 9.3.1.1.7 Patch
Hi friends, One of my client is trying to install Hyperion Planning patch 93117 on an existing intall: 931. The readme file actually goes through a lot of other changes besides planning. e.g., to the EAS.ear HBRlauncher.war etc. I need to know if tha