Commit in servicemix/base/src/main/java/org/servicemix/jbi/config/spring on MAIN
BeanElementProcessor.java+19-121.4 -> 1.5
Corrected the handling of the interface-name in the services element, which needs to be a QName.  Also allow the declaration of namespaces on elements other than the root jbi,  this is useful when you are utilizing the connections and services elements of the jbi.xml

servicemix/base/src/main/java/org/servicemix/jbi/config/spring
BeanElementProcessor.java 1.4 -> 1.5
diff -u -r1.4 -r1.5
--- BeanElementProcessor.java	8 Aug 2005 16:48:41 -0000	1.4
+++ BeanElementProcessor.java	17 Aug 2005 00:10:17 -0000	1.5
@@ -31,7 +31,7 @@
 /**
  * Maps an element to a top level <bean> element.
  * 
- * @version $Revision: 1.4 $
+ * @version $Revision: 1.5 $
  */
 public class BeanElementProcessor extends ElementProcessorSupport implements
 		ElementProcessor {
@@ -133,17 +133,24 @@
 		NamedNodeMap attributes = from.getAttributes();
 		for (int i = 0, size = attributes.getLength(); i < size; i++) {
 			Attr node = (Attr) attributes.item(i);
-
-			// If the attribute is serviceName then we need to
-			// turn the property into a QName
-			if (node.getNodeName().equals("service-name")) {
-				Element propertyElement = addPropertyElement(to,
-						node.getName(), null);
-				QNameElementProcessor qnameElementProcessor = new QNameElementProcessor();
-				qnameElementProcessor.addQNameBeanElement(propertyElement,
-						DOMUtil.createQName(from, node.getNodeValue()));
-			} else
-				addPropertyElement(to, node.getName(), node.getValue());
+			// If the attribute is prefixed xmlns: then we we want to ignore
+			// it
+			if (node.getNodeName().startsWith("xmlns:")) {
+				to.setAttribute(node.getNodeName(), node.getNodeValue());
+			} else {
+				// If the attribute is service-name or interface-name then we
+				// need
+				// to turn the property into a QName
+				if (node.getNodeName().equals("service-name")
+						|| node.getNodeName().equals("interface-name")) {
+					Element propertyElement = addPropertyElement(to, node
+							.getName(), null);
+					QNameElementProcessor qnameElementProcessor = new QNameElementProcessor();
+					qnameElementProcessor.addQNameBeanElement(propertyElement,
+							DOMUtil.createQName(from, node.getNodeValue()));
+				} else
+					addPropertyElement(to, node.getName(), node.getValue());
+			}
 		}
 	}
 }
CVSspam 0.2.8



Reply via email to