Author: ashish
Date: Fri Oct 14 11:41:46 2011 New Revision: 1183315 URL: http://svn.apache.org/viewvc?rev=1183315&view=rev Log: Applied changes from trunk r1183314. Bug fix: Applied patch from jira issue OFBIZ-4441. UtilXml firstChildElement should use getNodeName instead of getLocalName. We have observed the same issue in past and provided a patch for the same. For more details please refer the commit r995384. Fixing bug of reading node name. When we read first child element of the response of any third party integration for example ups etc, node name can't be read using "node.getLocalName()". So changing node.getLocalName() --> node.getNodeName(). This time before I revert my changes I will wait for Bilgin's comment to understand the exact problem with SOAP call due to which he did this changes. Bilgin please post your comment on this as soon as you get a chance. http://svn.apache.org/viewvc?view=revision&revision=894359 Thanks Kiran, Sascha for the contribution. We were also observing this issue since quite long so for now it is better to put the code in trunk and releasebranch. Modified: ofbiz/branches/release11.04/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalWorker.java ofbiz/branches/release11.04/framework/base/src/org/ofbiz/base/util/UtilXml.java ofbiz/branches/release11.04/framework/service/src/org/ofbiz/service/config/ServiceConfigUtil.java Modified: ofbiz/branches/release11.04/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalWorker.java URL: http://svn.apache.org/viewvc/ofbiz/branches/release11.04/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalWorker.java?rev=1183315&r1=1183314&r2=1183315&view=diff ============================================================================== --- ofbiz/branches/release11.04/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalWorker.java (original) +++ ofbiz/branches/release11.04/applications/workeffort/src/org/ofbiz/workeffort/workeffort/ICalWorker.java Fri Oct 14 11:41:46 2011 @@ -191,12 +191,12 @@ public class ICalWorker { List<Element> unSupportedProps = FastList.newInstance(); List<Element> propElements = helper.getFindPropsList(ResponseHelper.DAV_NAMESPACE_URI); for (Element propElement : propElements) { - if ("getetag".equals(propElement.getLocalName())) { + if ("getetag".equals(propElement.getNodeName())) { Element etagElement = helper.createElementSetValue("D:getetag", String.valueOf(System.currentTimeMillis())); supportedProps.add(etagElement); continue; } - if ("getlastmodified".equals(propElement.getLocalName())) { + if ("getlastmodified".equals(propElement.getNodeName())) { Date lastModified = getLastModifiedDate(request); Element lmElement = helper.createElementSetValue("D:getlastmodified", WebDavUtil.formatDate(WebDavUtil.RFC1123_DATE_FORMAT, lastModified)); supportedProps.add(lmElement); Modified: ofbiz/branches/release11.04/framework/base/src/org/ofbiz/base/util/UtilXml.java URL: http://svn.apache.org/viewvc/ofbiz/branches/release11.04/framework/base/src/org/ofbiz/base/util/UtilXml.java?rev=1183315&r1=1183314&r2=1183315&view=diff ============================================================================== --- ofbiz/branches/release11.04/framework/base/src/org/ofbiz/base/util/UtilXml.java (original) +++ ofbiz/branches/release11.04/framework/base/src/org/ofbiz/base/util/UtilXml.java Fri Oct 14 11:41:46 2011 @@ -757,7 +757,7 @@ public class UtilXml { if (node != null) { do { - if (node.getNodeType() == Node.ELEMENT_NODE && childElementNames.contains(node.getLocalName())) { + if (node.getNodeType() == Node.ELEMENT_NODE && childElementNames.contains(node.getNodeName())) { Element childElement = (Element) node; return childElement; @@ -803,7 +803,7 @@ public class UtilXml { if (node != null) { do { if (node.getNodeType() == Node.ELEMENT_NODE && (childElementName == null || - childElementName.equals(node.getLocalName()))) { + childElementName.equals(node.getNodeName()))) { Element childElement = (Element) node; return childElement; } Modified: ofbiz/branches/release11.04/framework/service/src/org/ofbiz/service/config/ServiceConfigUtil.java URL: http://svn.apache.org/viewvc/ofbiz/branches/release11.04/framework/service/src/org/ofbiz/service/config/ServiceConfigUtil.java?rev=1183315&r1=1183314&r2=1183315&view=diff ============================================================================== --- ofbiz/branches/release11.04/framework/service/src/org/ofbiz/service/config/ServiceConfigUtil.java (original) +++ ofbiz/branches/release11.04/framework/service/src/org/ofbiz/service/config/ServiceConfigUtil.java Fri Oct 14 11:41:46 2011 @@ -154,7 +154,7 @@ public class ServiceConfigUtil implement if (node != null) { do { - if (node.getNodeType() == Node.ELEMENT_NODE && "engine".equals(node.getLocalName())) { + if (node.getNodeType() == Node.ELEMENT_NODE && "engine".equals(node.getNodeName())) { Element engine = (Element) node; if (engineName.equals(engine.getAttribute("name"))) { NodeList params = engine.getElementsByTagName("parameter"); |
Free forum by Nabble | Edit this page |