34: begin
35: l_level_stack.DELETE;
36: ecx_print_local.i_tmpxml.DELETE;
37: ecx_print_local.l_node_stack.DELETE;
38: ecx_utils.g_node_tbl.DELETE;
39:
40: exception
41: when others then
42: ecx_debug.setErrorInfo(2, 30, SQLERRM || '- ECX_INBOUND_NEW.CLEAN_UP_TABLES');
40: exception
41: when others then
42: ecx_debug.setErrorInfo(2, 30, SQLERRM || '- ECX_INBOUND_NEW.CLEAN_UP_TABLES');
43: if(l_unexpectedEnabled) then
44: ecx_debug.log(l_unexpected,ecx_utils.i_errbuf,i_method_name);
45: end if;
46: raise ecx_utils.program_exit;
47: end clean_up_tables;
48:
42: ecx_debug.setErrorInfo(2, 30, SQLERRM || '- ECX_INBOUND_NEW.CLEAN_UP_TABLES');
43: if(l_unexpectedEnabled) then
44: ecx_debug.log(l_unexpected,ecx_utils.i_errbuf,i_method_name);
45: end if;
46: raise ecx_utils.program_exit;
47: end clean_up_tables;
48:
49:
50: procedure get_element_value (
72: exception
73: when others then
74: ecx_debug.setErrorInfo(2, 30, SQLERRM || '- ECX_INBOUND_NEW.GET_ELEMENT_VALUE');
75: if(l_unexpectedEnabled) then
76: ecx_debug.log(l_unexpected,ecx_utils.i_errbuf,i_method_name);
77: end if;
78: raise ecx_utils.program_exit;
79: end get_element_value;
80:
74: ecx_debug.setErrorInfo(2, 30, SQLERRM || '- ECX_INBOUND_NEW.GET_ELEMENT_VALUE');
75: if(l_unexpectedEnabled) then
76: ecx_debug.log(l_unexpected,ecx_utils.i_errbuf,i_method_name);
77: end if;
78: raise ecx_utils.program_exit;
79: end get_element_value;
80:
81:
82: function setDocLogsAttributes (
109: end if;
110: i_found := false;
111: i_update := false;
112:
113: if ecx_utils.g_standard_id is null
114: then
115: if (l_procedureEnabled) then
116: ecx_debug.pop(i_method_name);
117: end if;
118: return true;
119: end if;
120:
121: /** Get all the Attributes and capture the value **/
122: for c1 in get_Attributes(p_standard_id => ecx_utils.g_standard_id)
123: loop
124: if (c1.attribute_name is not null and c1.element_tag_name is not null) then
125: get_element_value (p_nodeList, p_count, c1.element_tag_name, i_found, i_value);
126:
144: if i_update
145: then
146: /** remove the last , and put the statement for the where clause **/
147: i_string := substr(i_string,1,length(i_string)-1);
148: i_string := i_string || ' where msgid = HEXTORAW('||i_single||ecx_utils.g_msgid||i_single||')';
149: if(l_statementEnabled) then
150: ecx_debug.log(l_statement,'i_string',i_string,i_method_name);
151: end if;
152: execute immediate i_string;
157:
158: return i_update;
159:
160: exception
161: WHEN ecx_utils.program_exit then
162: if (l_procedureEnabled) then
163: ecx_debug.pop(i_method_name);
164: end if;
165: raise ecx_utils.program_exit;
161: WHEN ecx_utils.program_exit then
162: if (l_procedureEnabled) then
163: ecx_debug.pop(i_method_name);
164: end if;
165: raise ecx_utils.program_exit;
166:
167: when others then
168: ecx_debug.setErrorInfo(2, 30, SQLERRM || '- ECX_INBOUND_NEW.setDocLogsAttributes');
169: if(l_unexpectedEnabled) then
166:
167: when others then
168: ecx_debug.setErrorInfo(2, 30, SQLERRM || '- ECX_INBOUND_NEW.setDocLogsAttributes');
169: if(l_unexpectedEnabled) then
170: ecx_debug.log(l_unexpected, ecx_utils.i_errbuf,i_method_name);
171: end if;
172: if (l_procedureEnabled) then
173: ecx_debug.pop(i_method_name);
174: end if;
171: end if;
172: if (l_procedureEnabled) then
173: ecx_debug.pop(i_method_name);
174: end if;
175: raise ecx_utils.program_exit;
176: end setDocLogsAttributes;
177:
178:
179: procedure print_stack is
191: exception
192: when others then
193: ecx_debug.setErrorInfo(2, 30, SQLERRM || '- ECX_INBOUND_NEW.PRINT_STACK');
194: if(l_unexpectedEnabled) then
195: ecx_debug.log(l_unexpected, ecx_utils.i_errbuf,i_method_name);
196: end if;
197: raise ecx_utils.program_exit;
198: end print_stack;
199:
193: ecx_debug.setErrorInfo(2, 30, SQLERRM || '- ECX_INBOUND_NEW.PRINT_STACK');
194: if(l_unexpectedEnabled) then
195: ecx_debug.log(l_unexpected, ecx_utils.i_errbuf,i_method_name);
196: end if;
197: raise ecx_utils.program_exit;
198: end print_stack;
199:
200:
201: procedure popStack
237: ecx_debug.pop(i_method_name);
238: end if;
239:
240: exception
241: WHEN ecx_utils.program_exit then
242: if (l_procedureEnabled) then
243: ecx_debug.pop(i_method_name);
244: end if;
245: raise ecx_utils.program_exit;
241: WHEN ecx_utils.program_exit then
242: if (l_procedureEnabled) then
243: ecx_debug.pop(i_method_name);
244: end if;
245: raise ecx_utils.program_exit;
246:
247: when others then
248: ecx_debug.setErrorInfo(2, 30, SQLERRM || '- ECX_INBOUND_NEW.popStack');
249: if(l_unexpectedEnabled) then
246:
247: when others then
248: ecx_debug.setErrorInfo(2, 30, SQLERRM || '- ECX_INBOUND_NEW.popStack');
249: if(l_unexpectedEnabled) then
250: ecx_debug.log(l_unexpected, ecx_utils.i_errbuf,i_method_name);
251: end if;
252: if (l_procedureEnabled) then
253: ecx_debug.pop(i_method_name);
254: end if;
251: end if;
252: if (l_procedureEnabled) then
253: ecx_debug.pop(i_method_name);
254: end if;
255: raise ecx_utils.program_exit;
256: end popStack;
257:
258:
259: procedure pushStack
311: ecx_debug.pop(i_method_name);
312: end if;
313:
314: exception
315: WHEN ecx_utils.program_exit then
316: if (l_procedureEnabled) then
317: ecx_debug.pop(i_method_name);
318: end if;
319: raise ecx_utils.program_exit;
315: WHEN ecx_utils.program_exit then
316: if (l_procedureEnabled) then
317: ecx_debug.pop(i_method_name);
318: end if;
319: raise ecx_utils.program_exit;
320:
321: when others then
322: ecx_debug.setErrorInfo(2, 30, SQLERRM || '- ECX_INBOUND_NEW.pushStack');
323: if(l_unexpectedEnabled) then
320:
321: when others then
322: ecx_debug.setErrorInfo(2, 30, SQLERRM || '- ECX_INBOUND_NEW.pushStack');
323: if(l_unexpectedEnabled) then
324: ecx_debug.log(l_unexpected, ecx_utils.i_errbuf,i_method_name);
325: end if;
326: if (l_procedureEnabled) then
327: ecx_debug.pop(i_method_name);
328: end if;
325: end if;
326: if (l_procedureEnabled) then
327: ecx_debug.pop(i_method_name);
328: end if;
329: raise ecx_utils.program_exit;
330: end pushStack;
331:
332:
333: procedure popall is
353: if (l_procedureEnabled) then
354: ecx_debug.pop(i_method_name);
355: end if;
356: exception
357: WHEN ecx_utils.program_exit then
358: if (l_procedureEnabled) then
359: ecx_debug.pop(i_method_name);
360: end if;
361: raise ecx_utils.program_exit;
357: WHEN ecx_utils.program_exit then
358: if (l_procedureEnabled) then
359: ecx_debug.pop(i_method_name);
360: end if;
361: raise ecx_utils.program_exit;
362:
363: when others then
364: ecx_debug.setErrorInfo(2, 30, SQLERRM || '- ECX_INBOUND_NEW.popall');
365: if(l_unexpectedEnabled) then
362:
363: when others then
364: ecx_debug.setErrorInfo(2, 30, SQLERRM || '- ECX_INBOUND_NEW.popall');
365: if(l_unexpectedEnabled) then
366: ecx_debug.log(l_unexpected, ecx_utils.i_errbuf,i_method_name);
367: end if;
368: if (l_procedureEnabled) then
369: ecx_debug.pop(i_method_name);
370: end if;
367: end if;
368: if (l_procedureEnabled) then
369: ecx_debug.pop(i_method_name);
370: end if;
371: raise ecx_utils.program_exit;
372: end popall;
373:
374:
375: procedure get_cond_node_value(
412: ecx_debug.pop(i_method_name);
413: end if;
414:
415: exception
416: WHEN ecx_utils.program_exit then
417: if (l_procedureEnabled) then
418: ecx_debug.pop(i_method_name);
419: end if;
420: raise ecx_utils.program_exit;
416: WHEN ecx_utils.program_exit then
417: if (l_procedureEnabled) then
418: ecx_debug.pop(i_method_name);
419: end if;
420: raise ecx_utils.program_exit;
421:
422: when others then
423: ecx_debug.setErrorInfo(2, 30, SQLERRM || '- ECX_INBOUND_NEW.GET_COND_NODE_VALUE');
424: if(l_unexpectedEnabled) then
421:
422: when others then
423: ecx_debug.setErrorInfo(2, 30, SQLERRM || '- ECX_INBOUND_NEW.GET_COND_NODE_VALUE');
424: if(l_unexpectedEnabled) then
425: ecx_debug.log(l_unexpected, ecx_utils.i_errbuf,i_method_name);
426: end if;
427: if (l_procedureEnabled) then
428: ecx_debug.pop(i_method_name);
429: end if;
426: end if;
427: if (l_procedureEnabled) then
428: ecx_debug.pop(i_method_name);
429: end if;
430: raise ecx_utils.program_exit;
431: end get_cond_node_value;
432:
433:
434: function get_node_id (
462: ecx_debug.log(l_statement, 'p_parent_node_id', p_parent_node_id,i_method_name);
463: ecx_debug.log(l_statement, 'p_parent_node_pos', p_parent_node_pos,i_method_name);
464: ecx_debug.log(l_statement, 'p_occur', p_occur,i_method_name);
465: ecx_debug.log(l_statement, 'p_node_value', p_node_value,i_method_name);
466: ecx_debug.log(l_statement, 'No of Elements in Source', ecx_utils.g_source.count,i_method_name);
467: end if;
468:
469: x_node_pos := -1;
470: i_parent_node_pos := p_parent_node_pos;
474: if(p_parent_node_pos < 0) then
475: i_parent_node_pos := 0;
476: end if;
477:
478: for i in i_parent_node_pos..ecx_utils.g_source.last
479: loop
480: if (ecx_utils.g_source(i).attribute_name = p_node_name) and
481: (ecx_utils.g_source(i).parent_attribute_id = p_parent_node_id)
482: then
476: end if;
477:
478: for i in i_parent_node_pos..ecx_utils.g_source.last
479: loop
480: if (ecx_utils.g_source(i).attribute_name = p_node_name) and
481: (ecx_utils.g_source(i).parent_attribute_id = p_parent_node_id)
482: then
483: p_cond_node := ecx_utils.g_source(i).cond_node;
484: p_cond_node_type := ecx_utils.g_source(i).cond_node_type;
477:
478: for i in i_parent_node_pos..ecx_utils.g_source.last
479: loop
480: if (ecx_utils.g_source(i).attribute_name = p_node_name) and
481: (ecx_utils.g_source(i).parent_attribute_id = p_parent_node_id)
482: then
483: p_cond_node := ecx_utils.g_source(i).cond_node;
484: p_cond_node_type := ecx_utils.g_source(i).cond_node_type;
485:
479: loop
480: if (ecx_utils.g_source(i).attribute_name = p_node_name) and
481: (ecx_utils.g_source(i).parent_attribute_id = p_parent_node_id)
482: then
483: p_cond_node := ecx_utils.g_source(i).cond_node;
484: p_cond_node_type := ecx_utils.g_source(i).cond_node_type;
485:
486: if (p_cond_node is not null) then
487:
480: if (ecx_utils.g_source(i).attribute_name = p_node_name) and
481: (ecx_utils.g_source(i).parent_attribute_id = p_parent_node_id)
482: then
483: p_cond_node := ecx_utils.g_source(i).cond_node;
484: p_cond_node_type := ecx_utils.g_source(i).cond_node_type;
485:
486: if (p_cond_node is not null) then
487:
488: if(l_statementEnabled) then
500: l_cond_node_value := p_node_value;
501: end if;
502:
503: -- find the mapping that match the condition.
504: if (l_cond_node_value = ecx_utils.g_source(i).cond_value) then
505: if ( p_parent_node_id = ecx_utils.g_source(i).parent_attribute_id )
506: then
507: x_node_pos := i;
508: l_node_id := ecx_utils.g_source(i).attribute_id;
501: end if;
502:
503: -- find the mapping that match the condition.
504: if (l_cond_node_value = ecx_utils.g_source(i).cond_value) then
505: if ( p_parent_node_id = ecx_utils.g_source(i).parent_attribute_id )
506: then
507: x_node_pos := i;
508: l_node_id := ecx_utils.g_source(i).attribute_id;
509: exit;
504: if (l_cond_node_value = ecx_utils.g_source(i).cond_value) then
505: if ( p_parent_node_id = ecx_utils.g_source(i).parent_attribute_id )
506: then
507: x_node_pos := i;
508: l_node_id := ecx_utils.g_source(i).attribute_id;
509: exit;
510: end if;
511: end if;
512:
512:
513: -- there is no conditional mapping. This is a mapping
514: -- depends on the occurrence.
515: elsif
516: ((ecx_utils.g_source(i).occurrence is null) or
517: (p_occur = ecx_utils.g_source(i).occurrence)) then
518: x_node_pos := i;
519: l_node_id := ecx_utils.g_source(i).attribute_id;
520: exit;
513: -- there is no conditional mapping. This is a mapping
514: -- depends on the occurrence.
515: elsif
516: ((ecx_utils.g_source(i).occurrence is null) or
517: (p_occur = ecx_utils.g_source(i).occurrence)) then
518: x_node_pos := i;
519: l_node_id := ecx_utils.g_source(i).attribute_id;
520: exit;
521:
515: elsif
516: ((ecx_utils.g_source(i).occurrence is null) or
517: (p_occur = ecx_utils.g_source(i).occurrence)) then
518: x_node_pos := i;
519: l_node_id := ecx_utils.g_source(i).attribute_id;
520: exit;
521:
522: elsif (l_node_id = p_parent_node_id) then
523: if(l_statementEnabled) then
523: if(l_statementEnabled) then
524: ecx_debug.log(l_statement,'l_node_id', l_node_id,i_method_name);
525: end if;
526: x_node_pos := i;
527: l_node_id := ecx_utils.g_source(i).attribute_id;
528: exit;
529: end if;
530: end if;
531: end loop;
540: end if;
541: return (l_node_id);
542:
543: EXCEPTION
544: WHEN ecx_utils.program_exit then
545: if (l_procedureEnabled) then
546: ecx_debug.pop(i_method_name);
547: end if;
548: raise ecx_utils.program_exit;
544: WHEN ecx_utils.program_exit then
545: if (l_procedureEnabled) then
546: ecx_debug.pop(i_method_name);
547: end if;
548: raise ecx_utils.program_exit;
549:
550: when others then
551: ecx_debug.setErrorInfo(2, 30, SQLERRM || '- ECX_INBOUND_NEW.GET_NODE_ID');
552: if(l_unexpectedEnabled) then
549:
550: when others then
551: ecx_debug.setErrorInfo(2, 30, SQLERRM || '- ECX_INBOUND_NEW.GET_NODE_ID');
552: if(l_unexpectedEnabled) then
553: ecx_debug.log(l_unexpected, ecx_utils.i_errbuf,i_method_name);
554: end if;
555: if (l_procedureEnabled) then
556: ecx_debug.pop(i_method_name);
557: end if;
554: end if;
555: if (l_procedureEnabled) then
556: ecx_debug.pop(i_method_name);
557: end if;
558: raise ecx_utils.program_exit;
559: END get_node_id;
560:
561:
562: procedure process_node (
584: ecx_debug.log(l_statement, 'node value', p_value,i_method_name);
585: ecx_debug.log(l_statement, 'p_cdata_flag',p_cdata_flag,i_method_name);
586: end if;
587:
588: l_cat_id := ecx_utils.g_source(p_int_col_pos).xref_category_id;
589:
590: if (l_cat_id is not null) then
591: ecx_code_conversion_pvt.convert_external_value
592: (
595: p_msg_count => l_msg_count,
596: p_msg_data => l_msg_data,
597: p_value => p_value,
598: p_category_id => l_cat_id,
599: p_snd_tp_id => ecx_utils.g_snd_tp_id,
600: p_rec_tp_id => ecx_utils.g_rec_tp_id ,
601: p_standard_id => ecx_utils.g_standard_id
602: );
603:
596: p_msg_data => l_msg_data,
597: p_value => p_value,
598: p_category_id => l_cat_id,
599: p_snd_tp_id => ecx_utils.g_snd_tp_id,
600: p_rec_tp_id => ecx_utils.g_rec_tp_id ,
601: p_standard_id => ecx_utils.g_standard_id
602: );
603:
604: If l_return_status = 'X' OR l_return_status = 'R' Then
597: p_value => p_value,
598: p_category_id => l_cat_id,
599: p_snd_tp_id => ecx_utils.g_snd_tp_id,
600: p_rec_tp_id => ecx_utils.g_rec_tp_id ,
601: p_standard_id => ecx_utils.g_standard_id
602: );
603:
604: If l_return_status = 'X' OR l_return_status = 'R' Then
605: ecx_utils.g_source(p_int_col_pos).xref_retcode := 1;
601: p_standard_id => ecx_utils.g_standard_id
602: );
603:
604: If l_return_status = 'X' OR l_return_status = 'R' Then
605: ecx_utils.g_source(p_int_col_pos).xref_retcode := 1;
606: else
607: ecx_utils.g_source(p_int_col_pos).xref_retcode := 0;
608: end if;
609:
603:
604: If l_return_status = 'X' OR l_return_status = 'R' Then
605: ecx_utils.g_source(p_int_col_pos).xref_retcode := 1;
606: else
607: ecx_utils.g_source(p_int_col_pos).xref_retcode := 0;
608: end if;
609:
610:
611: if(l_statementEnabled) then
609:
610:
611: if(l_statementEnabled) then
612: ecx_debug.log(l_statement,'xref return code',
613: ecx_utils.g_source(p_int_col_pos).xref_retcode,
614: i_method_name);
615: end if;
616:
617: if (l_return_status = ecx_code_conversion_pvt.G_RET_STS_ERROR) or
635: end if;
636:
637:
638: if ((p_value is null and p_clob_value is null) OR (p_value is not null) ) then
639: ecx_utils.g_source(p_int_col_pos).value := p_value;
640: else
641: l_len := dbms_lob.getlength(p_clob_value);
642: if(l_len <= ecx_utils.G_CLOB_VARCHAR_LEN) Then
643: ecx_utils.g_source(p_int_col_pos).value :=dbms_lob.substr(p_clob_value,l_len,1);
638: if ((p_value is null and p_clob_value is null) OR (p_value is not null) ) then
639: ecx_utils.g_source(p_int_col_pos).value := p_value;
640: else
641: l_len := dbms_lob.getlength(p_clob_value);
642: if(l_len <= ecx_utils.G_CLOB_VARCHAR_LEN) Then
643: ecx_utils.g_source(p_int_col_pos).value :=dbms_lob.substr(p_clob_value,l_len,1);
644: ecx_utils.g_source(p_int_col_pos).clob_value := null ;
645: ecx_utils.g_source(p_int_col_pos).clob_length := null ;
646: else
639: ecx_utils.g_source(p_int_col_pos).value := p_value;
640: else
641: l_len := dbms_lob.getlength(p_clob_value);
642: if(l_len <= ecx_utils.G_CLOB_VARCHAR_LEN) Then
643: ecx_utils.g_source(p_int_col_pos).value :=dbms_lob.substr(p_clob_value,l_len,1);
644: ecx_utils.g_source(p_int_col_pos).clob_value := null ;
645: ecx_utils.g_source(p_int_col_pos).clob_length := null ;
646: else
647: ecx_utils.g_source(p_int_col_pos).clob_value := p_clob_value;
640: else
641: l_len := dbms_lob.getlength(p_clob_value);
642: if(l_len <= ecx_utils.G_CLOB_VARCHAR_LEN) Then
643: ecx_utils.g_source(p_int_col_pos).value :=dbms_lob.substr(p_clob_value,l_len,1);
644: ecx_utils.g_source(p_int_col_pos).clob_value := null ;
645: ecx_utils.g_source(p_int_col_pos).clob_length := null ;
646: else
647: ecx_utils.g_source(p_int_col_pos).clob_value := p_clob_value;
648: ecx_utils.g_source(p_int_col_pos).clob_length := l_len;
641: l_len := dbms_lob.getlength(p_clob_value);
642: if(l_len <= ecx_utils.G_CLOB_VARCHAR_LEN) Then
643: ecx_utils.g_source(p_int_col_pos).value :=dbms_lob.substr(p_clob_value,l_len,1);
644: ecx_utils.g_source(p_int_col_pos).clob_value := null ;
645: ecx_utils.g_source(p_int_col_pos).clob_length := null ;
646: else
647: ecx_utils.g_source(p_int_col_pos).clob_value := p_clob_value;
648: ecx_utils.g_source(p_int_col_pos).clob_length := l_len;
649: end if;
643: ecx_utils.g_source(p_int_col_pos).value :=dbms_lob.substr(p_clob_value,l_len,1);
644: ecx_utils.g_source(p_int_col_pos).clob_value := null ;
645: ecx_utils.g_source(p_int_col_pos).clob_length := null ;
646: else
647: ecx_utils.g_source(p_int_col_pos).clob_value := p_clob_value;
648: ecx_utils.g_source(p_int_col_pos).clob_length := l_len;
649: end if;
650: end if;
651: if (p_cdata_flag = 'Y') then
644: ecx_utils.g_source(p_int_col_pos).clob_value := null ;
645: ecx_utils.g_source(p_int_col_pos).clob_length := null ;
646: else
647: ecx_utils.g_source(p_int_col_pos).clob_value := p_clob_value;
648: ecx_utils.g_source(p_int_col_pos).clob_length := l_len;
649: end if;
650: end if;
651: if (p_cdata_flag = 'Y') then
652: ecx_utils.g_source(p_int_col_pos).is_clob := p_cdata_flag;
648: ecx_utils.g_source(p_int_col_pos).clob_length := l_len;
649: end if;
650: end if;
651: if (p_cdata_flag = 'Y') then
652: ecx_utils.g_source(p_int_col_pos).is_clob := p_cdata_flag;
653: end if;
654:
655:
656: if(l_statementEnabled) then
653: end if;
654:
655:
656: if(l_statementEnabled) then
657: ecx_debug.log(l_statement,ecx_utils.g_source(p_int_col_pos).attribute_name ,
658: ecx_utils.g_source(p_int_col_pos).value||' '||
659: ecx_utils.g_source(p_int_col_pos).base_column_name||' '||' '||
660: p_int_col_pos,i_method_name);
661: end if;
654:
655:
656: if(l_statementEnabled) then
657: ecx_debug.log(l_statement,ecx_utils.g_source(p_int_col_pos).attribute_name ,
658: ecx_utils.g_source(p_int_col_pos).value||' '||
659: ecx_utils.g_source(p_int_col_pos).base_column_name||' '||' '||
660: p_int_col_pos,i_method_name);
661: end if;
662:
655:
656: if(l_statementEnabled) then
657: ecx_debug.log(l_statement,ecx_utils.g_source(p_int_col_pos).attribute_name ,
658: ecx_utils.g_source(p_int_col_pos).value||' '||
659: ecx_utils.g_source(p_int_col_pos).base_column_name||' '||' '||
660: p_int_col_pos,i_method_name);
661: end if;
662:
663: if (l_procedureEnabled) then
673: if (l_procedureEnabled) then
674: ecx_debug.pop(i_method_name);
675: end if;
676:
677: WHEN ecx_utils.program_exit then
678: if (l_procedureEnabled) then
679: ecx_debug.pop(i_method_name);
680: end if;
681: raise ecx_utils.program_exit;
677: WHEN ecx_utils.program_exit then
678: if (l_procedureEnabled) then
679: ecx_debug.pop(i_method_name);
680: end if;
681: raise ecx_utils.program_exit;
682:
683: WHEN others then
684: ecx_debug.setErrorInfo(2, 30, SQLERRM || '- ECX_INBOUND_NEW.PROCESS_NODE');
685: if(l_unexpectedEnabled) then
682:
683: WHEN others then
684: ecx_debug.setErrorInfo(2, 30, SQLERRM || '- ECX_INBOUND_NEW.PROCESS_NODE');
685: if(l_unexpectedEnabled) then
686: ecx_debug.log(l_unexpected, ecx_utils.i_errbuf,i_method_name);
687: end if;
688: if (l_procedureEnabled) then
689: ecx_debug.pop(i_method_name);
690: end if;
687: end if;
688: if (l_procedureEnabled) then
689: ecx_debug.pop(i_method_name);
690: end if;
691: raise ecx_utils.program_exit;
692: END process_node;
693:
694:
695: procedure printNodeInfoStack
709: exception
710: when others then
711: ecx_debug.setErrorInfo(2, 30, SQLERRM || '- ECX_INBOUND_NEW.printNodeInfoStack');
712: if(l_unexpectedEnabled) then
713: ecx_debug.log(l_unexpected, ecx_utils.i_errbuf,i_method_name);
714: end if;
715: raise ecx_utils.program_exit;
716: end printNodeInfoStack;
717:
711: ecx_debug.setErrorInfo(2, 30, SQLERRM || '- ECX_INBOUND_NEW.printNodeInfoStack');
712: if(l_unexpectedEnabled) then
713: ecx_debug.log(l_unexpected, ecx_utils.i_errbuf,i_method_name);
714: end if;
715: raise ecx_utils.program_exit;
716: end printNodeInfoStack;
717:
718:
719: procedure pushNodeInfoStack (
729: node_info_stack(l_stack_indx).parent_xml_node_indx := p_parent_index;
730:
731: printNodeInfoStack;
732: exception
733: WHEN ecx_utils.program_exit then
734: raise ecx_utils.program_exit;
735:
736: when others then
737: ecx_debug.setErrorInfo(2, 30, SQLERRM || '- ECX_INBOUND_NEW.pushNodeInfoStack');
730:
731: printNodeInfoStack;
732: exception
733: WHEN ecx_utils.program_exit then
734: raise ecx_utils.program_exit;
735:
736: when others then
737: ecx_debug.setErrorInfo(2, 30, SQLERRM || '- ECX_INBOUND_NEW.pushNodeInfoStack');
738: if(l_unexpectedEnabled) then
735:
736: when others then
737: ecx_debug.setErrorInfo(2, 30, SQLERRM || '- ECX_INBOUND_NEW.pushNodeInfoStack');
738: if(l_unexpectedEnabled) then
739: ecx_debug.log(l_unexpected, ecx_utils.i_errbuf,i_method_name);
740: end if;
741: raise ecx_utils.program_exit;
742: end pushNodeInfoStack;
743:
737: ecx_debug.setErrorInfo(2, 30, SQLERRM || '- ECX_INBOUND_NEW.pushNodeInfoStack');
738: if(l_unexpectedEnabled) then
739: ecx_debug.log(l_unexpected, ecx_utils.i_errbuf,i_method_name);
740: end if;
741: raise ecx_utils.program_exit;
742: end pushNodeInfoStack;
743:
744:
745: procedure popNodeInfoStack (
764: end loop;
765: printNodeInfoStack;
766:
767: exception
768: WHEN ecx_utils.program_exit then
769: raise ecx_utils.program_exit;
770:
771: when others then
772: ecx_debug.setErrorInfo(2, 30, SQLERRM || '- ECX_INBOUND_NEW.popNodeInfoStack');
765: printNodeInfoStack;
766:
767: exception
768: WHEN ecx_utils.program_exit then
769: raise ecx_utils.program_exit;
770:
771: when others then
772: ecx_debug.setErrorInfo(2, 30, SQLERRM || '- ECX_INBOUND_NEW.popNodeInfoStack');
773: if(l_unexpectedEnabled) then
770:
771: when others then
772: ecx_debug.setErrorInfo(2, 30, SQLERRM || '- ECX_INBOUND_NEW.popNodeInfoStack');
773: if(l_unexpectedEnabled) then
774: ecx_debug.log(l_unexpected, ecx_utils.i_errbuf,i_method_name);
775: end if;
776: raise ecx_utils.program_exit;
777: end popNodeInfoStack;
778:
772: ecx_debug.setErrorInfo(2, 30, SQLERRM || '- ECX_INBOUND_NEW.popNodeInfoStack');
773: if(l_unexpectedEnabled) then
774: ecx_debug.log(l_unexpected, ecx_utils.i_errbuf,i_method_name);
775: end if;
776: raise ecx_utils.program_exit;
777: end popNodeInfoStack;
778:
779:
780: /* This procedure is called by the Java LoadMap to do level processing. */
887:
888: end loop;
889:
890: ecx_inbound.process_data(p_level, 20, p_next);
891: ecx_utils.g_total_records := ecx_utils.g_total_records + 1;
892:
893: if (l_procedureEnabled) then
894: ecx_debug.pop(i_method_name);
895: end if;
894: ecx_debug.pop(i_method_name);
895: end if;
896:
897: EXCEPTION
898: WHEN ecx_utils.program_exit then
899: clean_up_tables;
900: x_err_msg := ecx_utils.i_errbuf;
901: if (l_procedureEnabled) then
902: ecx_debug.pop(i_method_name);
896:
897: EXCEPTION
898: WHEN ecx_utils.program_exit then
899: clean_up_tables;
900: x_err_msg := ecx_utils.i_errbuf;
901: if (l_procedureEnabled) then
902: ecx_debug.pop(i_method_name);
903: end if;
904: -- if do a raise here, then java can't get the x_err_msg info.
908: when others then
909: clean_up_tables;
910: ecx_debug.setErrorInfo(2, 30, SQLERRM || '- ECX_INBOUND_NEW.PROCESSLEVEL');
911: if(l_unexpectedEnabled) then
912: ecx_debug.log(l_unexpected, ecx_utils.i_errbuf,i_method_name);
913: end if;
914: x_err_msg := ecx_utils.i_errbuf;
915: if (l_procedureEnabled) then
916: ecx_debug.pop(i_method_name);
910: ecx_debug.setErrorInfo(2, 30, SQLERRM || '- ECX_INBOUND_NEW.PROCESSLEVEL');
911: if(l_unexpectedEnabled) then
912: ecx_debug.log(l_unexpected, ecx_utils.i_errbuf,i_method_name);
913: end if;
914: x_err_msg := ecx_utils.i_errbuf;
915: if (l_procedureEnabled) then
916: ecx_debug.pop(i_method_name);
917: end if;
918: -- same reason as above in program_exit
929: ecx_debug.push(i_method_name);
930: end if;
931:
932: -- Initialize global variable and the Stack for the Levels
933: ecx_utils.g_previous_level := 0;
934: l_level_stack.DELETE;
935:
936: /** Initialize the attr table **/
937: l_attr_rec.DELETE;
946:
947: l_next_pos := 0;
948:
949: -- if necessary initialize the printing
950: if (not (ecx_utils.dom_printing) and (ecx_utils.structure_printing))
951: then
952: ecx_inbound.structurePrintingSetup(i_root_name);
953: end if;
954:
963: ecx_debug.pop(i_method_name);
964: end if;
965:
966: EXCEPTION
967: WHEN ecx_utils.program_exit then
968: if (l_procedureEnabled) then
969: ecx_debug.pop(i_method_name);
970: end if;
971: raise ecx_utils.program_exit;
967: WHEN ecx_utils.program_exit then
968: if (l_procedureEnabled) then
969: ecx_debug.pop(i_method_name);
970: end if;
971: raise ecx_utils.program_exit;
972:
973: WHEN OTHERS THEN
974: ecx_debug.setErrorInfo(2, 30, SQLERRM || '- ECX_INBOUND_NEW.STARTDOCUMENT');
975: if(l_unexpectedEnabled) then
972:
973: WHEN OTHERS THEN
974: ecx_debug.setErrorInfo(2, 30, SQLERRM || '- ECX_INBOUND_NEW.STARTDOCUMENT');
975: if(l_unexpectedEnabled) then
976: ecx_debug.log(l_unexpected, ecx_utils.i_errbuf,i_method_name);
977: end if;
978: if (l_procedureEnabled) then
979: ecx_debug.pop(i_method_name);
980: end if;
977: end if;
978: if (l_procedureEnabled) then
979: ecx_debug.pop(i_method_name);
980: end if;
981: raise ecx_utils.program_exit;
982: END startDocument;
983:
984:
985: procedure endDocument (
992: ecx_debug.push(i_method_name);
993: end if;
994: popall;
995:
996: if (ecx_utils.structure_printing)
997: then
998: ecx_print_local.xmlPopall(x_xmlclob);
999: ecx_util_api.parseXML(ecx_utils.g_inb_parser, x_xmlclob,
1000: x_parseXML, ecx_utils.g_xmldoc);
995:
996: if (ecx_utils.structure_printing)
997: then
998: ecx_print_local.xmlPopall(x_xmlclob);
999: ecx_util_api.parseXML(ecx_utils.g_inb_parser, x_xmlclob,
1000: x_parseXML, ecx_utils.g_xmldoc);
1001: end if;
1002:
1003: -- Execute the Stage 30 for Level 0
996: if (ecx_utils.structure_printing)
997: then
998: ecx_print_local.xmlPopall(x_xmlclob);
999: ecx_util_api.parseXML(ecx_utils.g_inb_parser, x_xmlclob,
1000: x_parseXML, ecx_utils.g_xmldoc);
1001: end if;
1002:
1003: -- Execute the Stage 30 for Level 0
1004: -- Post-Processing for Target
1008: ecx_actions.execute_stage_data(30,0,'S');
1009:
1010: if(l_statementEnabled) then
1011: ecx_debug.log(l_statement, 'Total record processed',
1012: ecx_utils.g_total_records - 1,i_method_name);
1013: end if;
1014:
1015: if (l_procedureEnabled) then
1016: ecx_debug.pop(i_method_name);
1016: ecx_debug.pop(i_method_name);
1017: end if;
1018:
1019: EXCEPTION
1020: WHEN ecx_utils.program_exit then
1021: if (l_procedureEnabled) then
1022: ecx_debug.pop(i_method_name);
1023: end if;
1024: raise ecx_utils.program_exit;
1020: WHEN ecx_utils.program_exit then
1021: if (l_procedureEnabled) then
1022: ecx_debug.pop(i_method_name);
1023: end if;
1024: raise ecx_utils.program_exit;
1025:
1026: WHEN OTHERS THEN
1027: ecx_debug.setErrorInfo(2, 30, SQLERRM || '- ECX_INBOUND_NEW.ENDDOCUMENT');
1028: if(l_unexpectedEnabled) then
1025:
1026: WHEN OTHERS THEN
1027: ecx_debug.setErrorInfo(2, 30, SQLERRM || '- ECX_INBOUND_NEW.ENDDOCUMENT');
1028: if(l_unexpectedEnabled) then
1029: ecx_debug.log(l_unexpected, ecx_utils.i_errbuf,i_method_name);
1030: end if;
1031: if (l_procedureEnabled) then
1032: ecx_debug.pop(i_method_name);
1033: end if;
1030: end if;
1031: if (l_procedureEnabled) then
1032: ecx_debug.pop(i_method_name);
1033: end if;
1034: raise ecx_utils.program_exit;
1035: END endDocument;
1036:
1037:
1038: Function LoadXML
1055: i_method_name varchar2(2000) := 'ecx_inbound_new.raise_loadxml_err';
1056:
1057: begin
1058: if (p_err_code = PROCESS_LEVEL_EXCEPTION) then
1059: raise ecx_utils.program_exit;
1060:
1061: elsif (p_err_code = SAX_EXCEPTION) then
1062: --Since in 10g, XDB XML_PARSE_EXCEPTION is appearing as SAX_EXCEPTION
1063: --incorporating the same exception handling of XML_PARSE_EXCEPTION here,
1061: elsif (p_err_code = SAX_EXCEPTION) then
1062: --Since in 10g, XDB XML_PARSE_EXCEPTION is appearing as SAX_EXCEPTION
1063: --incorporating the same exception handling of XML_PARSE_EXCEPTION here,
1064: --otherwise it is appearing as user-defined exception.
1065: -- raise ecx_utils.program_exit;
1066: ecx_debug.setErrorInfo(1, 20, p_err_msg);
1067: if(l_unexpectedEnabled) then
1068: ecx_debug.log(l_unexpected,'Error Code: ' ||p_err_code,i_method_name);
1069: ecx_debug.log(l_unexpected, ecx_utils.i_errbuf,i_method_name);
1065: -- raise ecx_utils.program_exit;
1066: ecx_debug.setErrorInfo(1, 20, p_err_msg);
1067: if(l_unexpectedEnabled) then
1068: ecx_debug.log(l_unexpected,'Error Code: ' ||p_err_code,i_method_name);
1069: ecx_debug.log(l_unexpected, ecx_utils.i_errbuf,i_method_name);
1070: end if;
1071: raise ecx_utils.program_exit;
1072:
1073: elsif (p_err_code = SQL_EXCEPTION) then
1067: if(l_unexpectedEnabled) then
1068: ecx_debug.log(l_unexpected,'Error Code: ' ||p_err_code,i_method_name);
1069: ecx_debug.log(l_unexpected, ecx_utils.i_errbuf,i_method_name);
1070: end if;
1071: raise ecx_utils.program_exit;
1072:
1073: elsif (p_err_code = SQL_EXCEPTION) then
1074: raise Load_XML_Exception;
1075:
1079: elsif (p_err_code = XML_PARSE_EXCEPTION) then
1080: ecx_debug.setErrorInfo(1, 20, p_err_msg);
1081: if(l_unexpectedEnabled) then
1082: ecx_debug.log(l_unexpected,'Error Code: ' ||p_err_code,i_method_name);
1083: ecx_debug.log(l_unexpected, ecx_utils.i_errbuf,i_method_name);
1084: end if;
1085: raise ecx_utils.program_exit;
1086:
1087: elsif (p_err_code = OTHER_EXCEPTION) then
1081: if(l_unexpectedEnabled) then
1082: ecx_debug.log(l_unexpected,'Error Code: ' ||p_err_code,i_method_name);
1083: ecx_debug.log(l_unexpected, ecx_utils.i_errbuf,i_method_name);
1084: end if;
1085: raise ecx_utils.program_exit;
1086:
1087: elsif (p_err_code = OTHER_EXCEPTION) then
1088: raise Load_XML_Exception;
1089: end if;
1092: when Load_XML_Exception then
1093: ecx_debug.setErrorInfo(2, 30, p_err_msg);
1094: if(l_unexpectedEnabled) then
1095: ecx_debug.log(l_unexpected,'Error Code: ' ||p_err_code,i_method_name);
1096: ecx_debug.log(l_unexpected, ecx_utils.i_errbuf,i_method_name);
1097: end if;
1098: raise ecx_utils.program_exit;
1099:
1100: when ecx_utils.program_exit then
1094: if(l_unexpectedEnabled) then
1095: ecx_debug.log(l_unexpected,'Error Code: ' ||p_err_code,i_method_name);
1096: ecx_debug.log(l_unexpected, ecx_utils.i_errbuf,i_method_name);
1097: end if;
1098: raise ecx_utils.program_exit;
1099:
1100: when ecx_utils.program_exit then
1101: raise;
1102: end raise_loadxml_err;
1096: ecx_debug.log(l_unexpected, ecx_utils.i_errbuf,i_method_name);
1097: end if;
1098: raise ecx_utils.program_exit;
1099:
1100: when ecx_utils.program_exit then
1101: raise;
1102: end raise_loadxml_err;
1103:
1104:
1143: ecx_debug.pop(i_method_name);
1144: end if;
1145:
1146: EXCEPTION
1147: WHEN ecx_utils.program_exit then
1148: clean_up_tables;
1149: if (l_procedureEnabled) then
1150: ecx_debug.pop(i_method_name);
1151: end if;
1148: clean_up_tables;
1149: if (l_procedureEnabled) then
1150: ecx_debug.pop(i_method_name);
1151: end if;
1152: raise ecx_utils.program_exit;
1153:
1154: WHEN OTHERS THEN
1155: clean_up_tables;
1156: ecx_debug.setErrorInfo(2, 30, SQLERRM || '- ECX_INBOUND_NEW.PROCESS_XML_DOC');
1154: WHEN OTHERS THEN
1155: clean_up_tables;
1156: ecx_debug.setErrorInfo(2, 30, SQLERRM || '- ECX_INBOUND_NEW.PROCESS_XML_DOC');
1157: if(l_unexpectedEnabled) then
1158: ecx_debug.log(l_unexpected, ecx_utils.i_errbuf,i_method_name);
1159: end if;
1160: if (l_procedureEnabled) then
1161: ecx_debug.pop(i_method_name);
1162: end if;
1159: end if;
1160: if (l_procedureEnabled) then
1161: ecx_debug.pop(i_method_name);
1162: end if;
1163: raise ecx_utils.program_exit;
1164: end process_xml_doc;
1165:
1166:
1167: END ecx_inbound_new;