You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2011/06/22 04:41:01 UTC
svn commit: r1138285 - in /camel/trunk:
components/camel-blueprint/src/main/java/org/apache/camel/blueprint/handler/
tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/
tests/camel-itest-osgi/src/test/resources/org/apache/camel/...
Author: ningjiang
Date: Wed Jun 22 02:41:00 2011
New Revision: 1138285
URL: http://svn.apache.org/viewvc?rev=1138285&view=rev
Log:
CAMEL-4133 Fix the issue of camel-blueprint doesn't handle elements with a namespace prefix
Modified:
camel/trunk/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/handler/CamelNamespaceHandler.java
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/OSGiBlueprintHelloWorldTest.java
camel/trunk/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/osgi/blueprint/blueprint-13.xml
Modified: camel/trunk/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/handler/CamelNamespaceHandler.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/handler/CamelNamespaceHandler.java?rev=1138285&r1=1138284&r2=1138285&view=diff
==============================================================================
--- camel/trunk/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/handler/CamelNamespaceHandler.java (original)
+++ camel/trunk/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/handler/CamelNamespaceHandler.java Wed Jun 22 02:41:00 2011
@@ -113,7 +113,7 @@ public class CamelNamespaceHandler imple
if (node.getNodeType() == Node.ELEMENT_NODE) {
Document doc = node.getOwnerDocument();
if (((Element) node).getNamespaceURI().equals(BLUEPRINT_NS)) {
- doc.renameNode(node, SPRING_NS, node.getNodeName());
+ doc.renameNode(node, SPRING_NS, node.getLocalName());
}
}
NodeList list = node.getChildNodes();
@@ -133,19 +133,19 @@ public class CamelNamespaceHandler imple
public Metadata parse(Element element, ParserContext context) {
renameNamespaceRecursive(element);
- if (element.getNodeName().equals(CAMEL_CONTEXT)) {
+ if (element.getLocalName().equals(CAMEL_CONTEXT)) {
return parseCamelContextNode(element, context);
}
- if (element.getNodeName().equals(ROUTE_CONTEXT)) {
+ if (element.getLocalName().equals(ROUTE_CONTEXT)) {
return parseRouteContextNode(element, context);
}
- if (element.getNodeName().equals(KEY_STORE_PARAMETERS)) {
+ if (element.getLocalName().equals(KEY_STORE_PARAMETERS)) {
return parseKeyStoreParametersNode(element, context);
}
- if (element.getNodeName().equals(SECURE_RANDOM_PARAMETERS)) {
+ if (element.getLocalName().equals(SECURE_RANDOM_PARAMETERS)) {
return parseSecureRandomParametersNode(element, context);
}
- if (element.getNodeName().equals(SSL_CONTEXT_PARAMETERS)) {
+ if (element.getLocalName().equals(SSL_CONTEXT_PARAMETERS)) {
return parseSSLContextParametersNode(element, context);
}
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/OSGiBlueprintHelloWorldTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/OSGiBlueprintHelloWorldTest.java?rev=1138285&r1=1138284&r2=1138285&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/OSGiBlueprintHelloWorldTest.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/OSGiBlueprintHelloWorldTest.java Wed Jun 22 02:41:00 2011
@@ -87,8 +87,8 @@ public class OSGiBlueprintHelloWorldTest
.set(Constants.BUNDLE_SYMBOLICNAME, OSGiBlueprintHelloWorldTest.class.getName())
.build()).noStart(),
- // install the spring, http features first
- scanFeatures(getKarafFeatureUrl(), "spring", "spring-dm", "jetty"),
+ // install the http features first
+ scanFeatures(getKarafFeatureUrl(), "jetty"),
// using the features to install the camel components
scanFeatures(getCamelKarafFeatureUrl(),
Modified: camel/trunk/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/osgi/blueprint/blueprint-13.xml
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/osgi/blueprint/blueprint-13.xml?rev=1138285&r1=1138284&r2=1138285&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/osgi/blueprint/blueprint-13.xml (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/osgi/blueprint/blueprint-13.xml Wed Jun 22 02:41:00 2011
@@ -15,13 +15,14 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+ xmlns:camel="http://camel.apache.org/schema/blueprint">
- <camelContext xmlns="http://camel.apache.org/schema/blueprint">
- <route>
- <from uri="file:target/foo"/>
- <to uri="mock:result"/>
- </route>
- </camelContext>
+ <camel:camelContext>
+ <camel:route>
+ <camel:from uri="file:target/foo"/>
+ <camel:to uri="mock:result"/>
+ </camel:route>
+ </camel:camelContext>
</blueprint>