You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2012/04/05 18:38:09 UTC
svn commit: r1309934 [2/5] - in /camel/trunk:
camel-core/src/main/java/org/apache/camel/builder/
camel-core/src/main/java/org/apache/camel/model/dataformat/
components/camel-xmljson/ components/camel-xmljson/src/
components/camel-xmljson/src/main/ comp...
Added: camel/trunk/components/camel-xmljson/src/test/java/org/apache/camel/dataformat/xmljson/XmlJsonOptionsTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-xmljson/src/test/java/org/apache/camel/dataformat/xmljson/XmlJsonOptionsTest.java?rev=1309934&view=auto
==============================================================================
--- camel/trunk/components/camel-xmljson/src/test/java/org/apache/camel/dataformat/xmljson/XmlJsonOptionsTest.java (added)
+++ camel/trunk/components/camel-xmljson/src/test/java/org/apache/camel/dataformat/xmljson/XmlJsonOptionsTest.java Thu Apr 5 16:38:07 2012
@@ -0,0 +1,159 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.dataformat.xmljson;
+
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.w3c.dom.Document;
+
+import net.sf.json.JSONObject;
+import net.sf.json.JSONSerializer;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.Test;
+
+/**
+ * Testing options to the XML JSON data format
+ */
+public class XmlJsonOptionsTest extends CamelTestSupport {
+
+ @Test
+ public void testSomeOptionsToJSON() throws Exception {
+ InputStream inStream = getClass().getClassLoader().getResourceAsStream("org/apache/camel/dataformat/xmljson/testMessage1.xml");
+ String in = context.getTypeConverter().convertTo(String.class, inStream);
+
+ MockEndpoint mockJSON = getMockEndpoint("mock:json");
+ mockJSON.expectedMessageCount(1);
+ mockJSON.message(0).body().isInstanceOf(byte[].class);
+
+ Object json = template.requestBody("direct:marshal", in);
+ String jsonString = context.getTypeConverter().convertTo(String.class, json);
+ JSONObject obj = (JSONObject) JSONSerializer.toJSON(jsonString);
+ assertEquals("JSON must contain 1 top-level element", 1, obj.entrySet().size());
+ assertTrue("Top-level element must be named root", obj.has("root"));
+
+ mockJSON.assertIsSatisfied();
+ }
+
+ @Test
+ public void testSomeOptionsToXML() throws Exception {
+ InputStream inStream = getClass().getClassLoader().getResourceAsStream("org/apache/camel/dataformat/xmljson/testMessage1.json");
+ String in = context.getTypeConverter().convertTo(String.class, inStream);
+
+ MockEndpoint mockXML = getMockEndpoint("mock:xml");
+ mockXML.expectedMessageCount(1);
+ mockXML.message(0).body().isInstanceOf(String.class);
+
+ Object marshalled = template.requestBody("direct:unmarshal", in);
+ Document document = context.getTypeConverter().convertTo(Document.class, marshalled);
+ assertEquals("The XML document doesn't carry newRoot as the root name", "newRoot", document.getDocumentElement().getLocalName());
+ // with expandable properties, array elements are converted to XML as a
+ // sequence of repetitive XML elements with the local name equal to the
+ // JSON key
+ // for example: { number: [1,2,3] }, normally converted to:
+ // <number><e>1</e><e>2</e><e>3</e></number> (where e can be modified by
+ // setting elementName)
+ // would be converted to
+ // <number>1</number><number>2</number><number>3</number>, if number is
+ // set as an expandable property
+ assertEquals("The number of direct child elements of newRoot with tag d (expandable property) is not 3", 3, document.getDocumentElement().getElementsByTagName("d").getLength());
+ assertEquals("The number of direct child elements of newRoot with tag e (expandable property) is not 3", 3, document.getDocumentElement().getElementsByTagName("e").getLength());
+ mockXML.assertIsSatisfied();
+ }
+
+ @Test
+ public void testNamespacesDropped() throws Exception {
+ InputStream inStream = getClass().getClassLoader().getResourceAsStream("org/apache/camel/dataformat/xmljson/testMessage2-namespaces.xml");
+ String in = context.getTypeConverter().convertTo(String.class, inStream);
+
+ MockEndpoint mockJSON = getMockEndpoint("mock:json");
+ mockJSON.expectedMessageCount(1);
+ mockJSON.message(0).body().isInstanceOf(byte[].class);
+
+ Object json = template.requestBody("direct:marshal", in);
+ String jsonString = context.getTypeConverter().convertTo(String.class, json);
+ JSONObject obj = (JSONObject) JSONSerializer.toJSON(jsonString);
+ assertEquals("JSON must contain 1 top-level element", 1, obj.entrySet().size());
+ assertTrue("Top-level element must be named root", obj.has("root"));
+ // check that no child of the top-level element has a colon in its key,
+ // which would denote that
+ // a namespace prefix exists
+ for (Object key : obj.getJSONObject("root").keySet()) {
+ assertFalse("A key contains a colon", ((String) key).contains(":"));
+ }
+
+ mockJSON.assertIsSatisfied();
+ }
+
+ @Test
+ public void testCustomNamespaceMappings() throws Exception {
+ InputStream inStream = getClass().getClassLoader().getResourceAsStream("org/apache/camel/dataformat/xmljson/testMessage2-namespaces.json");
+ String in = context.getTypeConverter().convertTo(String.class, inStream);
+
+ MockEndpoint mockXML = getMockEndpoint("mock:xmlNS");
+ mockXML.expectedMessageCount(1);
+ mockXML.message(0).body().isInstanceOf(String.class);
+
+ Object marshalled = template.requestBody("direct:unmarshalNS", in);
+ Document document = context.getTypeConverter().convertTo(Document.class, marshalled);
+ assertEquals("Element surname must be qualified in the default namespace", "http://camel.apache.org/default", document.getDocumentElement().getElementsByTagName("surname").item(0)
+ .getNamespaceURI());
+ assertEquals("Root element must be qualified in the default namespace", "http://camel.apache.org/default", document.getDocumentElement().getNamespaceURI());
+ assertEquals("Element surname must have namespace attributes", 2, document.getDocumentElement().getElementsByTagName("surname").item(0).getAttributes().getLength());
+ assertEquals("Root element must have namespace attributes", 2, document.getDocumentElement().getAttributes().getLength());
+ mockXML.assertIsSatisfied();
+ }
+
+ @Override
+ protected RouteBuilder createRouteBuilder() throws Exception {
+ return new RouteBuilder() {
+ @Override
+ public void configure() throws Exception {
+ XmlJsonDataFormat format = new XmlJsonDataFormat();
+ format.setEncoding("UTF-8");
+ format.setForceTopLevelObject(true);
+ format.setTrimSpaces(true);
+ format.setRootName("newRoot");
+ format.setSkipNamespaces(true);
+ format.setRemoveNamespacePrefixes(true);
+ format.setExpandableProperties(Arrays.asList("d", "e"));
+
+ // from XML to JSON
+ from("direct:marshal").marshal(format).to("mock:json");
+ // from JSON to XML
+ from("direct:unmarshal").unmarshal(format).to("mock:xml");
+
+ XmlJsonDataFormat namespacesFormat = new XmlJsonDataFormat();
+ List<XmlJsonDataFormat.NamespacesPerElementMapping> namespaces = new ArrayList<XmlJsonDataFormat.NamespacesPerElementMapping>();
+ namespaces.add(new XmlJsonDataFormat.NamespacesPerElementMapping("", "|ns1|http://camel.apache.org/test1||http://camel.apache.org/default|"));
+ namespaces.add(new XmlJsonDataFormat.NamespacesPerElementMapping("surname", "|ns2|http://camel.apache.org/personalData|ns3|http://camel.apache.org/personalData2|"));
+ namespacesFormat.setNamespaceMappings(namespaces);
+ namespacesFormat.setTrimSpaces(true);
+ // from XML to JSON
+ from("direct:marshalNS").marshal(namespacesFormat).to("mock:jsonNS");
+ // from JSON to XML
+ from("direct:unmarshalNS").unmarshal(namespacesFormat).to("mock:xmlNS");
+
+ }
+ };
+ }
+
+}
Propchange: camel/trunk/components/camel-xmljson/src/test/java/org/apache/camel/dataformat/xmljson/XmlJsonOptionsTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: camel/trunk/components/camel-xmljson/src/test/java/org/apache/camel/dataformat/xmljson/XmlJsonOptionsTest.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: camel/trunk/components/camel-xmljson/src/test/java/org/apache/camel/dataformat/xmljson/XmlJsonStressTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-xmljson/src/test/java/org/apache/camel/dataformat/xmljson/XmlJsonStressTest.java?rev=1309934&view=auto
==============================================================================
--- camel/trunk/components/camel-xmljson/src/test/java/org/apache/camel/dataformat/xmljson/XmlJsonStressTest.java (added)
+++ camel/trunk/components/camel-xmljson/src/test/java/org/apache/camel/dataformat/xmljson/XmlJsonStressTest.java Thu Apr 5 16:38:07 2012
@@ -0,0 +1,110 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.dataformat.xmljson;
+
+import java.io.InputStream;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.TimeUnit;
+
+import org.apache.camel.Exchange;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.Test;
+
+/**
+ * Stress tests for the XML JSON data format: concurrency and large JSON and XML documents
+ */
+public class XmlJsonStressTest extends CamelTestSupport {
+
+ @Test
+ public void testNoConcurrentProducers() throws Exception {
+ doSendMessages(1, 1, "direct:startFromXML", "org/apache/camel/dataformat/xmljson/testMessage1.xml");
+ }
+
+ @Test
+ public void testConcurrentProducers() throws Exception {
+ doSendMessages(1000, 5, "direct:startFromXML", "org/apache/camel/dataformat/xmljson/testMessage1.xml");
+ }
+
+ @Test
+ public void testLargeMessages() throws Exception {
+ doSendMessages(5, 2, "direct:startFromXML", "org/apache/camel/dataformat/xmljson/testMessage3-large.xml");
+ resetMocks();
+ doSendMessages(5, 2, "direct:startFromJson", "org/apache/camel/dataformat/xmljson/testMessage3-large.json");
+ }
+
+ private void doSendMessages(int files, int poolSize, final String endpointURI, String resourceURI) throws Exception {
+ MockEndpoint mockJSON = getMockEndpoint("mock:json");
+ MockEndpoint mockXML = getMockEndpoint("mock:xml");
+ mockJSON.expectedMessageCount(files);
+ mockXML.expectedMessageCount(files);
+
+ InputStream inStream = getClass().getClassLoader().getResourceAsStream(resourceURI);
+ final String in = context.getTypeConverter().convertTo(String.class, inStream);
+
+ ExecutorService executor = Executors.newFixedThreadPool(poolSize);
+ for (int i = 0; i < files; i++) {
+ executor.submit(new Callable<Object>() {
+ public Object call() throws Exception {
+ template.sendBody(endpointURI, in);
+ return null;
+ }
+ });
+ }
+
+ assertMockEndpointsSatisfied(30000, TimeUnit.MILLISECONDS);
+
+ // test that all messages are equal
+ Object jsonBody = mockJSON.getExchanges().get(0).getIn().getBody(String.class);
+ Object xmlBody = mockXML.getExchanges().get(0).getIn().getBody(String.class);
+
+ for (Exchange e : mockJSON.getExchanges()) {
+ assertEquals("Bodies are expected to be equal (json mock endpoint)", jsonBody, e.getIn().getBody(String.class));
+ }
+
+ for (Exchange e : mockXML.getExchanges()) {
+ assertEquals("Bodies are expected to be equal (xml mock endpoint)", xmlBody, e.getIn().getBody(String.class));
+ }
+
+ mockJSON.reset();
+ mockXML.reset();
+
+ executor.shutdownNow();
+ }
+
+ protected RouteBuilder createRouteBuilder() {
+ return new RouteBuilder() {
+ public void configure() {
+ XmlJsonDataFormat format = new XmlJsonDataFormat();
+
+ // from XML to JSON
+ from("direct:startFromXML").marshal(format).to("mock:json").to("direct:unmarshalToJson");
+ // from JSON to XML
+ from("direct:unmarshalToJson").unmarshal(format).to("mock:xml");
+
+ // from JSON to XML
+ from("direct:startFromJson").unmarshal(format).to("mock:json").to("direct:marshalToXML");
+ // from XML to JSON
+ from("direct:marshalToXML").marshal(format).to("mock:xml");
+ }
+ };
+ }
+
+}
Propchange: camel/trunk/components/camel-xmljson/src/test/java/org/apache/camel/dataformat/xmljson/XmlJsonStressTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: camel/trunk/components/camel-xmljson/src/test/java/org/apache/camel/dataformat/xmljson/XmlJsonStressTest.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: camel/trunk/components/camel-xmljson/src/test/resources/log4j.properties
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-xmljson/src/test/resources/log4j.properties?rev=1309934&view=auto
==============================================================================
--- camel/trunk/components/camel-xmljson/src/test/resources/log4j.properties (added)
+++ camel/trunk/components/camel-xmljson/src/test/resources/log4j.properties Thu Apr 5 16:38:07 2012
@@ -0,0 +1,36 @@
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements. See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License. You may obtain a copy of the License at
+##
+## http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
+
+#
+# The logging properties used during tests..
+#
+log4j.rootLogger=INFO, file
+
+# uncomment this to turn on debug of camel
+#log4j.logger.org.apache.camel=DEBUG
+
+# CONSOLE appender not used by default
+log4j.appender.out=org.apache.log4j.ConsoleAppender
+log4j.appender.out.layout=org.apache.log4j.PatternLayout
+log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
+
+# File appender
+log4j.appender.file=org.apache.log4j.FileAppender
+log4j.appender.file.layout=org.apache.log4j.PatternLayout
+log4j.appender.file.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
+log4j.appender.file.file=target/camel-xmljson-test.log
+log4j.appender.file.append=true
Propchange: camel/trunk/components/camel-xmljson/src/test/resources/log4j.properties
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: camel/trunk/components/camel-xmljson/src/test/resources/log4j.properties
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: camel/trunk/components/camel-xmljson/src/test/resources/log4j.properties
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: camel/trunk/components/camel-xmljson/src/test/resources/org/apache/camel/dataformat/xmljson/SpringXmlJsonDataFormatTest.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-xmljson/src/test/resources/org/apache/camel/dataformat/xmljson/SpringXmlJsonDataFormatTest.xml?rev=1309934&view=auto
==============================================================================
--- camel/trunk/components/camel-xmljson/src/test/resources/org/apache/camel/dataformat/xmljson/SpringXmlJsonDataFormatTest.xml (added)
+++ camel/trunk/components/camel-xmljson/src/test/resources/org/apache/camel/dataformat/xmljson/SpringXmlJsonDataFormatTest.xml Thu Apr 5 16:38:07 2012
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
+
+ <!-- START SNIPPET: e1 -->
+ <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
+
+ <!-- we define the xml json data formats to be used -->
+ <dataFormats>
+ <xmljson id="xmljson" />
+ <!-- format.setEncoding("UTF-8");
+ format.setForceTopLevelObject(true);
+ format.setTrimSpaces(true);
+ format.setRootName("newRoot");
+ format.setSkipNamespaces(true);
+ format.setRemoveNamespacePrefixes(true);
+ format.setExpandableProperties(Arrays.asList("d", "e")); -->
+ <xmljson id="xmljsonWithOptions" forceTopLevelObject="true" trimSpaces="true" rootName="newRoot"
+ skipNamespaces="true" removeNamespacePrefixes="true" expandableProperties="d e" />
+ </dataFormats>
+
+ <route>
+ <from uri="direct:marshal"/>
+ <marshal ref="xmljson"/>
+ <to uri="mock:json" />
+ </route>
+
+ <route>
+ <from uri="direct:unmarshal"/>
+ <unmarshal ref="xmljson"/>
+ <to uri="mock:xml"/>
+ </route>
+
+ <route>
+ <from uri="direct:marshalWithOptions"/>
+ <marshal ref="xmljsonWithOptions"/>
+ <to uri="mock:jsonWithOptions" />
+ </route>
+
+ <route>
+ <from uri="direct:unmarshalWithOptions"/>
+ <unmarshal ref="xmljsonWithOptions"/>
+ <to uri="mock:xmlWithOptions"/>
+ </route>
+
+ </camelContext>
+ <!-- END SNIPPET: e1 -->
+
+</beans>
Propchange: camel/trunk/components/camel-xmljson/src/test/resources/org/apache/camel/dataformat/xmljson/SpringXmlJsonDataFormatTest.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: camel/trunk/components/camel-xmljson/src/test/resources/org/apache/camel/dataformat/xmljson/SpringXmlJsonDataFormatTest.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: camel/trunk/components/camel-xmljson/src/test/resources/org/apache/camel/dataformat/xmljson/SpringXmlJsonDataFormatTest.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: camel/trunk/components/camel-xmljson/src/test/resources/org/apache/camel/dataformat/xmljson/testMessage1.json
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-xmljson/src/test/resources/org/apache/camel/dataformat/xmljson/testMessage1.json?rev=1309934&view=auto
==============================================================================
--- camel/trunk/components/camel-xmljson/src/test/resources/org/apache/camel/dataformat/xmljson/testMessage1.json (added)
+++ camel/trunk/components/camel-xmljson/src/test/resources/org/apache/camel/dataformat/xmljson/testMessage1.json Thu Apr 5 16:38:07 2012
@@ -0,0 +1 @@
+{ "a": "1", "b": "2", "c": { "a": "c.a.1", "b": "c.b.2" }, "d": ["a", "b", "c"], "e": [1, 2, 3], "f": true, "g": null}
\ No newline at end of file
Added: camel/trunk/components/camel-xmljson/src/test/resources/org/apache/camel/dataformat/xmljson/testMessage1.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-xmljson/src/test/resources/org/apache/camel/dataformat/xmljson/testMessage1.xml?rev=1309934&view=auto
==============================================================================
--- camel/trunk/components/camel-xmljson/src/test/resources/org/apache/camel/dataformat/xmljson/testMessage1.xml (added)
+++ camel/trunk/components/camel-xmljson/src/test/resources/org/apache/camel/dataformat/xmljson/testMessage1.xml Thu Apr 5 16:38:07 2012
@@ -0,0 +1,17 @@
+<!-- { "a": "1", "b": "2", "c": { "a": "c.a.1", "b": "c.b.2" }, "d": ["a", "b", "c"], "e": [1, 2, 3], "f": true, "g": null} -->
+<root>
+ <a>1</a>
+ <b>2</b>
+ <c>
+ <a>c.a.1</a>
+ <b>c.b.2</b>
+ </c>
+ <d>a</d>
+ <d>b</d>
+ <d>c</d>
+ <e>1</e>
+ <e>2</e>
+ <e>3</e>
+ <f>true</f>
+ <g />
+</root>
\ No newline at end of file
Propchange: camel/trunk/components/camel-xmljson/src/test/resources/org/apache/camel/dataformat/xmljson/testMessage1.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: camel/trunk/components/camel-xmljson/src/test/resources/org/apache/camel/dataformat/xmljson/testMessage1.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: camel/trunk/components/camel-xmljson/src/test/resources/org/apache/camel/dataformat/xmljson/testMessage1.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: camel/trunk/components/camel-xmljson/src/test/resources/org/apache/camel/dataformat/xmljson/testMessage2-namespaces.json
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-xmljson/src/test/resources/org/apache/camel/dataformat/xmljson/testMessage2-namespaces.json?rev=1309934&view=auto
==============================================================================
--- camel/trunk/components/camel-xmljson/src/test/resources/org/apache/camel/dataformat/xmljson/testMessage2-namespaces.json (added)
+++ camel/trunk/components/camel-xmljson/src/test/resources/org/apache/camel/dataformat/xmljson/testMessage2-namespaces.json Thu Apr 5 16:38:07 2012
@@ -0,0 +1 @@
+{ "name": "Raul", "surname": "Kripalani", "c": { "a": "c.a.1", "b": "c.b.2" }, "d": ["Raul Kripalani", "b", "c"], "e": [1, 2, 3], "f": true, "g": null}
\ No newline at end of file
Added: camel/trunk/components/camel-xmljson/src/test/resources/org/apache/camel/dataformat/xmljson/testMessage2-namespaces.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-xmljson/src/test/resources/org/apache/camel/dataformat/xmljson/testMessage2-namespaces.xml?rev=1309934&view=auto
==============================================================================
--- camel/trunk/components/camel-xmljson/src/test/resources/org/apache/camel/dataformat/xmljson/testMessage2-namespaces.xml (added)
+++ camel/trunk/components/camel-xmljson/src/test/resources/org/apache/camel/dataformat/xmljson/testMessage2-namespaces.xml Thu Apr 5 16:38:07 2012
@@ -0,0 +1,18 @@
+<root xmlns="http://camel.apache.org/xmljson"
+ xmlns:a="http://camel.apache.org/anotherNS"
+ xmlns:b="http://camel.apache.org/yetAnotherNS">
+ <a:name>Raul</a:name>
+ <b:surname>Kripalani</b:surname>
+ <c xmlns="http://camel.apache.org/embeddedNS">
+ <a>c.a.1</a>
+ <b>c.b.2</b>
+ </c>
+ <fullname>Raul Kripalani</fullname>
+ <d>b</d>
+ <d>c</d>
+ <e>1</e>
+ <e>2</e>
+ <e>3</e>
+ <f>true</f>
+ <g />
+</root>
\ No newline at end of file
Propchange: camel/trunk/components/camel-xmljson/src/test/resources/org/apache/camel/dataformat/xmljson/testMessage2-namespaces.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: camel/trunk/components/camel-xmljson/src/test/resources/org/apache/camel/dataformat/xmljson/testMessage2-namespaces.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: camel/trunk/components/camel-xmljson/src/test/resources/org/apache/camel/dataformat/xmljson/testMessage2-namespaces.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml