1: PACKAGE BODY ecx_inbound as
2: --$Header: ECXINBB.pls 120.4 2006/06/07 07:33:43 susaha ship $
3:
4: l_procedure PLS_INTEGER := ecx_debug.g_procedure;
5: l_statement PLS_INTEGER := ecx_debug.g_statement;
27: i_target IN pls_integer
28: )
29: is
30:
31: i_method_name varchar2(2000) := 'ecx_inbound.updatedom';
32:
33: p_node xmlDOM.DOMNode;
34: l_text_node xmldom.DOMNode;
35:
72: ecx_debug.pop(i_method_name);
73: end if;
74: exception
75: when others then
76: ecx_debug.setErrorInfo(2, 30, SQLERRM || ' - ECX_INBOUND.updateDOM');
77: if(l_statementEnabled) then
78: ecx_debug.log(l_statement,'ECX', SQLERRM || ' - ECX_INBOUND.updateDOM',
79: i_method_name);
80: end if;
74: exception
75: when others then
76: ecx_debug.setErrorInfo(2, 30, SQLERRM || ' - ECX_INBOUND.updateDOM');
77: if(l_statementEnabled) then
78: ecx_debug.log(l_statement,'ECX', SQLERRM || ' - ECX_INBOUND.updateDOM',
79: i_method_name);
80: end if;
81: if (l_procedureEnabled) then
82: ecx_debug.pop(i_method_name);
89: i_target in pls_integer
90: )
91: is
92:
93: i_method_name varchar2(2000) := 'ecx_inbound.processTarget';
94: begin
95: if (l_procedureEnabled) then
96: ecx_debug.push(i_method_name);
97: end if;
191: end if;
192: raise ecx_utils.program_exit;
193: when others then
194: /* Start of bug# 2186635*/
195: ecx_debug.setErrorInfo(2, 30, ecx_utils.i_errbuf || ' - ECX_INBOUND.processTarget');
196: /* End of bug# 2186635 */
197: if(l_statementEnabled) then
198: ecx_debug.log(l_statement,'ECX', ecx_utils.i_errbuf || ' - ECX_INBOUND.processTarget',
199: i_method_name);
194: /* Start of bug# 2186635*/
195: ecx_debug.setErrorInfo(2, 30, ecx_utils.i_errbuf || ' - ECX_INBOUND.processTarget');
196: /* End of bug# 2186635 */
197: if(l_statementEnabled) then
198: ecx_debug.log(l_statement,'ECX', ecx_utils.i_errbuf || ' - ECX_INBOUND.processTarget',
199: i_method_name);
200: end if;
201: if (l_procedureEnabled) then
202: ecx_debug.pop(i_method_name);
210: i_stage in pls_integer ,
211: i_next IN pls_integer
212: )
213: is
214: i_method_name varchar2(2000) := 'ecx_inbound. process_data';
215: begin
216:
217: if (l_procedureEnabled) then
218: ecx_debug.push(i_method_name);
366:
367:
368: procedure print_stack
369: is
370: i_method_name varchar2(2000) := 'ecx_inbound.print_stack';
371: begin
372: if(l_statementEnabled) then
373: ecx_debug.log(l_statement,'Stack Status','====',i_method_name);
374: for i in 1..i_stack.COUNT
388: (
389: i_next in pls_integer
390: )
391: is
392: i_method_name varchar2(2000) := 'ecx_inbound.pop';
393: begin
394: if (l_procedureEnabled) then
395: ecx_debug.push(i_method_name);
396: end if;
442: (
443: i in pls_integer
444: )
445: is
446: i_method_name varchar2(2000) := 'ecx_inbound.push';
447: begin
448: if (l_procedureEnabled) then
449: ecx_debug.push(i_method_name);
450: end if;
549:
550:
551: procedure popall
552: is
553: i_method_name varchar2(2000) := 'ecx_inbound.popall';
554: begin
555: if (l_procedureEnabled) then
556: ecx_debug.push(i_method_name);
557: end if;
595:
596: procedure start_level(
597: p_node_pos IN Varchar2) IS
598:
599: i_method_name varchar2(2000) := 'ecx_inbound.start_level';
600:
601: l_match Boolean := false;
602: i pls_integer;
603:
645: WHEN others then
646: if(l_statementEnabled) then
647: ecx_debug.log(l_statement, 'ECX', 'ECX_PROGRAM_ERROR',i_method_name,
648: 'PROGRESS_LEVEL',
649: 'ECX_INBOUND.START_LEVEL');
650: ecx_debug.log(l_statement, 'ECX', 'ECX_ERROR_MESSAGE',i_method_name, 'ERROR_MESSAGE', SQLERRM);
651: ecx_debug.log(l_statement, 'ECX', ecx_utils.i_errbuf || SQLERRM || ' ECX_INBOUND.START_LEVEL',
652: i_method_name);
653: end if;
647: ecx_debug.log(l_statement, 'ECX', 'ECX_PROGRAM_ERROR',i_method_name,
648: 'PROGRESS_LEVEL',
649: 'ECX_INBOUND.START_LEVEL');
650: ecx_debug.log(l_statement, 'ECX', 'ECX_ERROR_MESSAGE',i_method_name, 'ERROR_MESSAGE', SQLERRM);
651: ecx_debug.log(l_statement, 'ECX', ecx_utils.i_errbuf || SQLERRM || ' ECX_INBOUND.START_LEVEL',
652: i_method_name);
653: end if;
654: ecx_debug.setErrorInfo(2, 30, ecx_utils.i_errbuf || SQLERRM || ' ECX_INBOUND.START_LEVEL');
655: if (l_procedureEnabled) then
650: ecx_debug.log(l_statement, 'ECX', 'ECX_ERROR_MESSAGE',i_method_name, 'ERROR_MESSAGE', SQLERRM);
651: ecx_debug.log(l_statement, 'ECX', ecx_utils.i_errbuf || SQLERRM || ' ECX_INBOUND.START_LEVEL',
652: i_method_name);
653: end if;
654: ecx_debug.setErrorInfo(2, 30, ecx_utils.i_errbuf || SQLERRM || ' ECX_INBOUND.START_LEVEL');
655: if (l_procedureEnabled) then
656: ecx_debug.pop(i_method_name);
657: end if;
658: raise ecx_utils.program_exit;
668: p_occur IN pls_integer,
669: x_node_pos OUT NOCOPY pls_integer,
670: x_parent_id IN OUT NOCOPY pls_integer) return pls_integer IS
671:
672: i_method_name varchar2(2000) := 'ecx_inbound.get_node_id';
673:
674: i pls_integer;
675: l_node_id pls_integer := -1;
676: p_cond_node Varchar2(200);
806:
807: WHEN others then
808: if(l_statementEnabled) then
809: ecx_debug.log(l_statement,'ECX', 'ECX_PROGRAM_ERROR',i_method_name,'PROGRESS_LEVEL',
810: 'ECX_INBOUND.GET_NODE_ID');
811: ecx_debug.log(l_statement, 'ECX', 'ECX_ERROR_MESSAGE',i_method_name, 'ERROR_MESSAGE', SQLERRM);
812: ecx_debug.log(l_statement, 'ECX', ecx_utils.i_errbuf || SQLERRM || ' - ECX_INBOUND.GET_NODE_ID: ',
813: i_method_name);
814: end if;
808: if(l_statementEnabled) then
809: ecx_debug.log(l_statement,'ECX', 'ECX_PROGRAM_ERROR',i_method_name,'PROGRESS_LEVEL',
810: 'ECX_INBOUND.GET_NODE_ID');
811: ecx_debug.log(l_statement, 'ECX', 'ECX_ERROR_MESSAGE',i_method_name, 'ERROR_MESSAGE', SQLERRM);
812: ecx_debug.log(l_statement, 'ECX', ecx_utils.i_errbuf || SQLERRM || ' - ECX_INBOUND.GET_NODE_ID: ',
813: i_method_name);
814: end if;
815: ecx_debug.setErrorInfo(2, 30, ecx_utils.i_errbuf || SQLERRM || ' - ECX_INBOUND.GET_NODE_ID: ');
816: if (l_procedureEnabled) then
811: ecx_debug.log(l_statement, 'ECX', 'ECX_ERROR_MESSAGE',i_method_name, 'ERROR_MESSAGE', SQLERRM);
812: ecx_debug.log(l_statement, 'ECX', ecx_utils.i_errbuf || SQLERRM || ' - ECX_INBOUND.GET_NODE_ID: ',
813: i_method_name);
814: end if;
815: ecx_debug.setErrorInfo(2, 30, ecx_utils.i_errbuf || SQLERRM || ' - ECX_INBOUND.GET_NODE_ID: ');
816: if (l_procedureEnabled) then
817: ecx_debug.pop(i_method_name);
818: end if;
819: raise ecx_utils.program_exit;
826: p_node IN OUT NOCOPY xmldom.DOMNode,
827: p_is_attribute IN Boolean) IS
828:
829:
830: i_method_name varchar2(2000) := 'ecx_inbound.process_node';
831:
832: l_value Varchar2(4000);
833: l_cat_id pls_integer;
834: l_return_status Varchar2(1);
950: WHEN others then
951: if(l_statementEnabled) then
952: ecx_debug.log(l_statement, 'ECX', 'ECX_PROGRAM_ERROR', i_method_name,
953: 'PROGRESS_LEVEL',
954: 'ECX_INBOUND.PROCESS_NODE');
955: ecx_debug.log(l_statement, 'ECX', ecx_utils.i_errbuf || SQLERRM || ' - ECX_INBOUND.PROCESS_NODE: ',
956: i_method_name);
957: end if;
958: ecx_debug.setErrorInfo(2, 30, ecx_utils.i_errbuf || SQLERRM || ' - ECX_INBOUND.PROCESS_NODE: ');
951: if(l_statementEnabled) then
952: ecx_debug.log(l_statement, 'ECX', 'ECX_PROGRAM_ERROR', i_method_name,
953: 'PROGRESS_LEVEL',
954: 'ECX_INBOUND.PROCESS_NODE');
955: ecx_debug.log(l_statement, 'ECX', ecx_utils.i_errbuf || SQLERRM || ' - ECX_INBOUND.PROCESS_NODE: ',
956: i_method_name);
957: end if;
958: ecx_debug.setErrorInfo(2, 30, ecx_utils.i_errbuf || SQLERRM || ' - ECX_INBOUND.PROCESS_NODE: ');
959:
954: 'ECX_INBOUND.PROCESS_NODE');
955: ecx_debug.log(l_statement, 'ECX', ecx_utils.i_errbuf || SQLERRM || ' - ECX_INBOUND.PROCESS_NODE: ',
956: i_method_name);
957: end if;
958: ecx_debug.setErrorInfo(2, 30, ecx_utils.i_errbuf || SQLERRM || ' - ECX_INBOUND.PROCESS_NODE: ');
959:
960: if (l_procedureEnabled) then
961: ecx_debug.pop(i_method_name);
962: end if;
972: p_node_pos IN pls_integer,
973: x_parent_node_map_id IN OUT NOCOPY pls_integer) IS
974:
975:
976: i_method_name varchar2(2000) := 'ecx_inbound.process_attributes';
977:
978: l_attr_node_name Varchar2(80);
979: l_attr_nodemap xmldom.DOMNamedNodeMap;
980: l_num_of_attr pls_integer;
1043:
1044: WHEN others then
1045: if(l_statementEnabled) then
1046: ecx_debug.log(l_statement,'ECX', 'ECX_PROGRAM_ERROR', i_method_name,'PROGRESS_LEVEL',
1047: 'ECX_INBOUND.PROCESS_ATTRIBUTES');
1048: ecx_debug.log(l_statement, 'ECX', 'ECX_ERROR_MESSAGE', i_method_name,'ERROR_MESSAGE', SQLERRM);
1049: ecx_debug.log(l_statement, 'ECX', ecx_utils.i_errbuf || SQLERRM || ' - ECX_INBOUND.PROCESS_ATTRIBUTES: ',
1050: i_method_name);
1051: end if;
1045: if(l_statementEnabled) then
1046: ecx_debug.log(l_statement,'ECX', 'ECX_PROGRAM_ERROR', i_method_name,'PROGRESS_LEVEL',
1047: 'ECX_INBOUND.PROCESS_ATTRIBUTES');
1048: ecx_debug.log(l_statement, 'ECX', 'ECX_ERROR_MESSAGE', i_method_name,'ERROR_MESSAGE', SQLERRM);
1049: ecx_debug.log(l_statement, 'ECX', ecx_utils.i_errbuf || SQLERRM || ' - ECX_INBOUND.PROCESS_ATTRIBUTES: ',
1050: i_method_name);
1051: end if;
1052: ecx_debug.setErrorInfo(2, 30, ecx_utils.i_errbuf || SQLERRM || ' - ECX_INBOUND.PROCESS_ATTRIBUTES: ');
1053: if (l_procedureEnabled) then
1048: ecx_debug.log(l_statement, 'ECX', 'ECX_ERROR_MESSAGE', i_method_name,'ERROR_MESSAGE', SQLERRM);
1049: ecx_debug.log(l_statement, 'ECX', ecx_utils.i_errbuf || SQLERRM || ' - ECX_INBOUND.PROCESS_ATTRIBUTES: ',
1050: i_method_name);
1051: end if;
1052: ecx_debug.setErrorInfo(2, 30, ecx_utils.i_errbuf || SQLERRM || ' - ECX_INBOUND.PROCESS_ATTRIBUTES: ');
1053: if (l_procedureEnabled) then
1054: ecx_debug.pop(i_method_name);
1055: end if;
1056: raise ecx_utils.program_exit;
1063: p_map_id IN pls_integer,
1064: x_root_node_id OUT NOCOPY pls_integer,
1065: x_root_node OUT NOCOPY xmldom.DOMNode) IS
1066:
1067: i_method_name varchar2(2000) := 'ecx_inbound.get_root_info';
1068:
1069: cursor get_root_elmt (
1070: p_map_id IN pls_integer) IS
1071: select eo.root_element,
1119:
1120: WHEN OTHERS THEN
1121: if(l_statementEnabled) then
1122: ecx_debug.log(l_statement, 'ECX', 'ECX_PROGRAM_ERROR',i_method_name,'PROGRESS_LEVEL',
1123: 'ECX_INBOUND.GET_ROOT_INFO');
1124: ecx_debug.log(l_statement, 'ECX', 'ECX_ERROR_MESSAGE',i_method_name ,'ERROR_MESSAGE', SQLERRM);
1125: ecx_debug.log(l_statement, 'ECX', ecx_utils.i_errbuf || SQLERRM || ' - ECX_INBOUND.GET_ROOT_INFO: ',i_method_name);
1126: end if;
1127: ecx_debug.setErrorInfo(2, 30, ecx_utils.i_errbuf || SQLERRM || ' - ECX_INBOUND.GET_ROOT_INFO: ');
1121: if(l_statementEnabled) then
1122: ecx_debug.log(l_statement, 'ECX', 'ECX_PROGRAM_ERROR',i_method_name,'PROGRESS_LEVEL',
1123: 'ECX_INBOUND.GET_ROOT_INFO');
1124: ecx_debug.log(l_statement, 'ECX', 'ECX_ERROR_MESSAGE',i_method_name ,'ERROR_MESSAGE', SQLERRM);
1125: ecx_debug.log(l_statement, 'ECX', ecx_utils.i_errbuf || SQLERRM || ' - ECX_INBOUND.GET_ROOT_INFO: ',i_method_name);
1126: end if;
1127: ecx_debug.setErrorInfo(2, 30, ecx_utils.i_errbuf || SQLERRM || ' - ECX_INBOUND.GET_ROOT_INFO: ');
1128: if (l_procedureEnabled) then
1129: ecx_debug.pop(i_method_name);
1123: 'ECX_INBOUND.GET_ROOT_INFO');
1124: ecx_debug.log(l_statement, 'ECX', 'ECX_ERROR_MESSAGE',i_method_name ,'ERROR_MESSAGE', SQLERRM);
1125: ecx_debug.log(l_statement, 'ECX', ecx_utils.i_errbuf || SQLERRM || ' - ECX_INBOUND.GET_ROOT_INFO: ',i_method_name);
1126: end if;
1127: ecx_debug.setErrorInfo(2, 30, ecx_utils.i_errbuf || SQLERRM || ' - ECX_INBOUND.GET_ROOT_INFO: ');
1128: if (l_procedureEnabled) then
1129: ecx_debug.pop(i_method_name);
1130: end if;
1131: raise ecx_utils.program_exit;
1140: i_root_name IN OUT NOCOPY varchar2
1141: )
1142: is
1143:
1144: i_method_name varchar2(2000) := 'ecx_inbound.structurePrintingSetup';
1145:
1146: i_filename varchar2(200);
1147:
1148: begin
1196: procedure getXMLDoc
1197:
1198: is
1199:
1200: i_method_name varchar2(2000) := 'ecx_inbound.getXMLDoc';
1201: i_writeamount number;
1202: i_temp varchar2(32767);
1203: apnd_status Boolean := FALSE;
1204: i_xmlDOc CLOB;
1290: x_xmlclob OUT NOCOPY clob,
1291: x_parseXML OUT NOCOPY boolean
1292: ) is
1293:
1294: i_method_name varchar2(2000) := 'ecx_inbound.process_xml_doc';
1295:
1296: l_root_node xmldom.DOMNode;
1297: l_root_element xmldom.DOMElement;
1298: l_node_list xmldom.DOMNodeList;
1636:
1637: WHEN OTHERS THEN
1638: if(l_statementEnabled) then
1639: ecx_debug.log(l_statement, 'ECX', 'ECX_PROGRAM_ERROR',i_method_Name,'PROGRESS_LEVEL',
1640: 'ECX_INBOUND.PROCESS_XML_DOC');
1641: ecx_debug.log(l_statement, 'ECX', 'ECX_ERROR_MESSAGE', i_method_name,'ERROR_MESSAGE', SQLERRM);
1642: ecx_debug.log(l_statement, 'Clean-up i_stack, l_node_stack and i_tmpxml', i_method_name);
1643: ecx_debug.log(l_statement, 'ECX', ecx_utils.i_errbuf || SQLERRM ||
1644: ' - ECX_INBOUND.PROCESS_XML_DOC: ', i_method_name);
1640: 'ECX_INBOUND.PROCESS_XML_DOC');
1641: ecx_debug.log(l_statement, 'ECX', 'ECX_ERROR_MESSAGE', i_method_name,'ERROR_MESSAGE', SQLERRM);
1642: ecx_debug.log(l_statement, 'Clean-up i_stack, l_node_stack and i_tmpxml', i_method_name);
1643: ecx_debug.log(l_statement, 'ECX', ecx_utils.i_errbuf || SQLERRM ||
1644: ' - ECX_INBOUND.PROCESS_XML_DOC: ', i_method_name);
1645: end if;
1646: ecx_debug.setErrorInfo(2, 30, ecx_utils.i_errbuf || SQLERRM ||
1647: ' - ECX_INBOUND.PROCESS_XML_DOC: ');
1648:
1643: ecx_debug.log(l_statement, 'ECX', ecx_utils.i_errbuf || SQLERRM ||
1644: ' - ECX_INBOUND.PROCESS_XML_DOC: ', i_method_name);
1645: end if;
1646: ecx_debug.setErrorInfo(2, 30, ecx_utils.i_errbuf || SQLERRM ||
1647: ' - ECX_INBOUND.PROCESS_XML_DOC: ');
1648:
1649: i_stack.DELETE;
1650: ecx_print_local.i_tmpxml.DELETE;
1651: ecx_print_local.l_node_stack.DELETE;
1656: raise ecx_utils.program_exit;
1657:
1658: END process_xml_doc;
1659:
1660: END ecx_inbound;