1813: l_occurrence NUMBER := 1;
1814: msg_component_exception EXCEPTION;
1815: -- Variables for xml message parsing
1816: l_parser xmlparser.parser;
1817: l_doc xmldom.domdocument;
1818: l_named_node_map xmldom.domnamednodemap;
1819: l_attribute_name VARCHAR2 (100);
1820: l_actual_attribute_name VARCHAR2 (100);
1821: l_attribute_value VARCHAR2 (100);
1814: msg_component_exception EXCEPTION;
1815: -- Variables for xml message parsing
1816: l_parser xmlparser.parser;
1817: l_doc xmldom.domdocument;
1818: l_named_node_map xmldom.domnamednodemap;
1819: l_attribute_name VARCHAR2 (100);
1820: l_actual_attribute_name VARCHAR2 (100);
1821: l_attribute_value VARCHAR2 (100);
1822: l_nodelist_length NUMBER;
1819: l_attribute_name VARCHAR2 (100);
1820: l_actual_attribute_name VARCHAR2 (100);
1821: l_attribute_value VARCHAR2 (100);
1822: l_nodelist_length NUMBER;
1823: l_dom_node xmldom.domnode;
1824: l_nodelist xmldom.domnodelist;
1825: l_attributes_buffer VARCHAR2 (4000);
1826: l_response_record WMS_WCS_DEVICE_GRP.MSG_COMPONENT_LOOKUP_TYPE;
1827: l_debug number := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);
1820: l_actual_attribute_name VARCHAR2 (100);
1821: l_attribute_value VARCHAR2 (100);
1822: l_nodelist_length NUMBER;
1823: l_dom_node xmldom.domnode;
1824: l_nodelist xmldom.domnodelist;
1825: l_attributes_buffer VARCHAR2 (4000);
1826: l_response_record WMS_WCS_DEVICE_GRP.MSG_COMPONENT_LOOKUP_TYPE;
1827: l_debug number := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);
1828: PRAGMA AUTONOMOUS_TRANSACTION;
1882: l_parser := xmlparser.newparser;
1883: xmlparser.parsebuffer (l_parser, l_msg);
1884: l_doc := xmlparser.getdocument (l_parser);
1885: -- get all elements
1886: l_nodelist := xmldom.getelementsbytagname (l_doc, '*');
1887: l_nodelist_length := xmldom.getlength (l_nodelist);
1888: -- loop through elements
1889: FOR i IN 0 .. l_nodelist_length - 1
1890: LOOP
1883: xmlparser.parsebuffer (l_parser, l_msg);
1884: l_doc := xmlparser.getdocument (l_parser);
1885: -- get all elements
1886: l_nodelist := xmldom.getelementsbytagname (l_doc, '*');
1887: l_nodelist_length := xmldom.getlength (l_nodelist);
1888: -- loop through elements
1889: FOR i IN 0 .. l_nodelist_length - 1
1890: LOOP
1891: l_dom_node := xmldom.item (l_nodelist, i);
1887: l_nodelist_length := xmldom.getlength (l_nodelist);
1888: -- loop through elements
1889: FOR i IN 0 .. l_nodelist_length - 1
1890: LOOP
1891: l_dom_node := xmldom.item (l_nodelist, i);
1892: --LOG (p_device_id, xmldom.getnodename (l_dom_node) || ' ');
1893: --LOG (p_device_id, '--------------');
1894: l_actual_attribute_name := xmldom.getnodename (l_dom_node);
1895: --This will come from the new component table
1888: -- loop through elements
1889: FOR i IN 0 .. l_nodelist_length - 1
1890: LOOP
1891: l_dom_node := xmldom.item (l_nodelist, i);
1892: --LOG (p_device_id, xmldom.getnodename (l_dom_node) || ' ');
1893: --LOG (p_device_id, '--------------');
1894: l_actual_attribute_name := xmldom.getnodename (l_dom_node);
1895: --This will come from the new component table
1896: /*
1890: LOOP
1891: l_dom_node := xmldom.item (l_nodelist, i);
1892: --LOG (p_device_id, xmldom.getnodename (l_dom_node) || ' ');
1893: --LOG (p_device_id, '--------------');
1894: l_actual_attribute_name := xmldom.getnodename (l_dom_node);
1895: --This will come from the new component table
1896: /*
1897: IF l_actual_attribute_name IN
1898: ('ORG', 'ITEM', 'QTY', 'ACTION', 'LPN', 'DEVCOMP1')
1901: )
1902: THEN
1903: --LOG (p_device_id, 'i=' || TO_CHAR (i));
1904: -- get all attributes of element
1905: l_named_node_map := xmldom.getattributes (l_dom_node);
1906: l_dom_node := xmldom.getfirstchild (l_dom_node);
1907: IF xmldom.isnull (l_dom_node) = FALSE
1908: THEN
1909: l_attribute_name := xmldom.getnodename (l_dom_node);
1902: THEN
1903: --LOG (p_device_id, 'i=' || TO_CHAR (i));
1904: -- get all attributes of element
1905: l_named_node_map := xmldom.getattributes (l_dom_node);
1906: l_dom_node := xmldom.getfirstchild (l_dom_node);
1907: IF xmldom.isnull (l_dom_node) = FALSE
1908: THEN
1909: l_attribute_name := xmldom.getnodename (l_dom_node);
1910: IF xmldom.getnodetype (l_dom_node) = xmldom.text_node
1903: --LOG (p_device_id, 'i=' || TO_CHAR (i));
1904: -- get all attributes of element
1905: l_named_node_map := xmldom.getattributes (l_dom_node);
1906: l_dom_node := xmldom.getfirstchild (l_dom_node);
1907: IF xmldom.isnull (l_dom_node) = FALSE
1908: THEN
1909: l_attribute_name := xmldom.getnodename (l_dom_node);
1910: IF xmldom.getnodetype (l_dom_node) = xmldom.text_node
1911: THEN
1905: l_named_node_map := xmldom.getattributes (l_dom_node);
1906: l_dom_node := xmldom.getfirstchild (l_dom_node);
1907: IF xmldom.isnull (l_dom_node) = FALSE
1908: THEN
1909: l_attribute_name := xmldom.getnodename (l_dom_node);
1910: IF xmldom.getnodetype (l_dom_node) = xmldom.text_node
1911: THEN
1912: l_no_of_msg_comps := l_no_of_msg_comps + 1;
1913: --LOG(p_device_id, 'l_no_of_msg_comps'||l_no_of_msg_comps);
1906: l_dom_node := xmldom.getfirstchild (l_dom_node);
1907: IF xmldom.isnull (l_dom_node) = FALSE
1908: THEN
1909: l_attribute_name := xmldom.getnodename (l_dom_node);
1910: IF xmldom.getnodetype (l_dom_node) = xmldom.text_node
1911: THEN
1912: l_no_of_msg_comps := l_no_of_msg_comps + 1;
1913: --LOG(p_device_id, 'l_no_of_msg_comps'||l_no_of_msg_comps);
1914: l_attribute_value := xmldom.getnodevalue (l_dom_node);
1910: IF xmldom.getnodetype (l_dom_node) = xmldom.text_node
1911: THEN
1912: l_no_of_msg_comps := l_no_of_msg_comps + 1;
1913: --LOG(p_device_id, 'l_no_of_msg_comps'||l_no_of_msg_comps);
1914: l_attribute_value := xmldom.getnodevalue (l_dom_node);
1915: IF l_debug > 0 THEN
1916: LOG (p_device_id, 'l_attribute_name= '
1917: || l_actual_attribute_name
1918: || ' val= '
1981: END IF;
1982: END IF;
1983: END LOOP;
1984: xmlparser.freeparser (l_parser);
1985: xmldom.freedocument (l_doc);
1986: ELSIF l_msg_type = wms_carousel_integration_pvt.v_msg_with_delimiter
1987: THEN
1988: --This is the start of parsing logic for message of type 2
1989: --Message with delimiter