Author: jonesde
Date: Mon Aug 6 20:22:55 2007
New Revision: 563381
URL:
http://svn.apache.org/viewvc?view=rev&rev=563381Log:
Changed to look for multiple DATAAREA elements instead of multiple INVENTORY elements as per the OAGIS XSD file; kind of a funny structure, but that's how it is in the XSD from OAGIS
Modified:
ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisInventoryServices.java
Modified: ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisInventoryServices.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisInventoryServices.java?view=diff&rev=563381&r1=563380&r2=563381==============================================================================
--- ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisInventoryServices.java (original)
+++ ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisInventoryServices.java Mon Aug 6 20:22:55 2007
@@ -99,15 +99,14 @@
String authId = UtilXml.childElementValue(docSenderElement, "of:AUTHID");
// data area elements
- Element dataAreaElement = UtilXml.firstChildElement(syncInventoryRootElement, "ns:DATAAREA");
- Element syncInventoryElement = UtilXml.firstChildElement(dataAreaElement, "ns:SYNC_INVENTORY");
-
- // get Inventory elements from message
- List syncInventoryElementList = UtilXml.childElementList(syncInventoryElement, "ns:INVENTORY");
- if (UtilValidate.isNotEmpty(syncInventoryElementList)) {
- Iterator syncInventoryElementIter = syncInventoryElementList.iterator();
- while (syncInventoryElementIter.hasNext()) {
- Element inventoryElement = (Element) syncInventoryElementIter.next();
+ List dataAreaList = UtilXml.childElementList(syncInventoryRootElement, "ns:DATAAREA");
+ if (UtilValidate.isNotEmpty(dataAreaList)) {
+ Iterator dataAreaIter = dataAreaList.iterator();
+ while (dataAreaIter.hasNext()) {
+ Element dataAreaElement = (Element) dataAreaIter.next();
+ Element syncInventoryElement = UtilXml.firstChildElement(dataAreaElement, "ns:SYNC_INVENTORY");
+ Element inventoryElement = UtilXml.firstChildElement(syncInventoryElement, "ns:INVENTORY");
+
Element quantityElement = UtilXml.firstChildElement(inventoryElement, "os:QUANTITY");
String itemQtyStr = UtilXml.childElementValue(quantityElement, "of:VALUE");