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 2015/03/18 12:33:20 UTC
[1/3] camel git commit: CAMEL-8505 Setup the message header according
to MEP
Repository: camel
Updated Branches:
refs/heads/master b3afcac20 -> 1e17b6b59
CAMEL-8505 Setup the message header according to MEP
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/1e17b6b5
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/1e17b6b5
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/1e17b6b5
Branch: refs/heads/master
Commit: 1e17b6b5948bd668f226e0f98211636b175782b0
Parents: 6365a5d
Author: Willem Jiang <wi...@gmail.com>
Authored: Wed Mar 18 19:29:06 2015 +0800
Committer: Willem Jiang <wi...@gmail.com>
Committed: Wed Mar 18 19:30:36 2015 +0800
----------------------------------------------------------------------
.../apache/camel/component/schematron/SchematronProducer.java | 1 -
.../camel/component/schematron/SchematronProducerTest.java | 7 ++++---
2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/1e17b6b5/components/camel-schematron/src/main/java/org/apache/camel/component/schematron/SchematronProducer.java
----------------------------------------------------------------------
diff --git a/components/camel-schematron/src/main/java/org/apache/camel/component/schematron/SchematronProducer.java b/components/camel-schematron/src/main/java/org/apache/camel/component/schematron/SchematronProducer.java
index e5d000b..9b3f354 100644
--- a/components/camel-schematron/src/main/java/org/apache/camel/component/schematron/SchematronProducer.java
+++ b/components/camel-schematron/src/main/java/org/apache/camel/component/schematron/SchematronProducer.java
@@ -72,7 +72,6 @@ public class SchematronProducer extends DefaultProducer {
Map<String, Object> headers = new HashMap<String, Object>();
headers.put(Constants.VALIDATION_STATUS, status);
headers.put(Constants.VALIDATION_REPORT, report);
- exchange.getOut().setHeader(Constants.VALIDATION_REPORT, report);
if (exchange.getPattern().isOutCapable()) {
exchange.getOut().setHeaders(exchange.getIn().getHeaders());
exchange.getOut().getHeaders().putAll(headers);
http://git-wip-us.apache.org/repos/asf/camel/blob/1e17b6b5/components/camel-schematron/src/test/java/org/apache/camel/component/schematron/SchematronProducerTest.java
----------------------------------------------------------------------
diff --git a/components/camel-schematron/src/test/java/org/apache/camel/component/schematron/SchematronProducerTest.java b/components/camel-schematron/src/test/java/org/apache/camel/component/schematron/SchematronProducerTest.java
index 169f7f2..6694503 100644
--- a/components/camel-schematron/src/test/java/org/apache/camel/component/schematron/SchematronProducerTest.java
+++ b/components/camel-schematron/src/test/java/org/apache/camel/component/schematron/SchematronProducerTest.java
@@ -54,19 +54,20 @@ public class SchematronProducerTest extends CamelTestSupport {
// assert
assertTrue(exc.getOut().getHeader(Constants.VALIDATION_STATUS).equals(Constants.SUCCESS));
+ assertNotNull("We should get the report here.", exc.getOut().getHeader(Constants.VALIDATION_REPORT));
}
@Test
public void testProcessInValidXML() throws Exception {
- Exchange exc = new DefaultExchange(context, ExchangePattern.InOut);
+ Exchange exc = new DefaultExchange(context, ExchangePattern.InOnly);
exc.getIn().setBody(ClassLoader.getSystemResourceAsStream("xml/article-2.xml"));
// process xml payload
producer.process(exc);
// assert
- assertTrue(exc.getOut().getHeader(Constants.VALIDATION_STATUS).equals(Constants.FAILED));
-
+ assertTrue("The validation status should be failed.", exc.getIn().getHeader(Constants.VALIDATION_STATUS).equals(Constants.FAILED));
+ assertNotNull("We should get the report here.", exc.getIn().getHeader(Constants.VALIDATION_REPORT));
}
}
[3/3] camel git commit: Fixed the CS error of camel-core
Posted by ni...@apache.org.
Fixed the CS error of camel-core
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/50954111
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/50954111
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/50954111
Branch: refs/heads/master
Commit: 50954111924562c0bcf291008bdf3d1aad1e8e88
Parents: b3afcac
Author: Willem Jiang <wi...@gmail.com>
Authored: Wed Mar 18 19:26:59 2015 +0800
Committer: Willem Jiang <wi...@gmail.com>
Committed: Wed Mar 18 19:30:36 2015 +0800
----------------------------------------------------------------------
.../apache/camel/impl/PojoProduceProxyInterceptEndpointTest.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/50954111/camel-core/src/test/java/org/apache/camel/impl/PojoProduceProxyInterceptEndpointTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/impl/PojoProduceProxyInterceptEndpointTest.java b/camel-core/src/test/java/org/apache/camel/impl/PojoProduceProxyInterceptEndpointTest.java
index f03ec9d..b9f24be 100644
--- a/camel-core/src/test/java/org/apache/camel/impl/PojoProduceProxyInterceptEndpointTest.java
+++ b/camel-core/src/test/java/org/apache/camel/impl/PojoProduceProxyInterceptEndpointTest.java
@@ -89,8 +89,8 @@ public class PojoProduceProxyInterceptEndpointTest extends TestCase {
context.stop();
}
- public static interface EchoService {
- public String echo(String word);
+ public interface EchoService {
+ String echo(String word);
}
public static class MyBean {
[2/3] camel git commit: CAMEL-8504 Fixed the Schematron XSLT
templates loading issue on windows
Posted by ni...@apache.org.
CAMEL-8504 Fixed the Schematron XSLT templates loading issue on windows
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/6365a5d1
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/6365a5d1
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/6365a5d1
Branch: refs/heads/master
Commit: 6365a5d134959b539a4ceb863e4a73f87f7ebd5e
Parents: 5095411
Author: Willem Jiang <wi...@gmail.com>
Authored: Wed Mar 18 19:28:24 2015 +0800
Committer: Willem Jiang <wi...@gmail.com>
Committed: Wed Mar 18 19:30:36 2015 +0800
----------------------------------------------------------------------
.../component/schematron/processor/ClassPathURIResolver.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/6365a5d1/components/camel-schematron/src/main/java/org/apache/camel/component/schematron/processor/ClassPathURIResolver.java
----------------------------------------------------------------------
diff --git a/components/camel-schematron/src/main/java/org/apache/camel/component/schematron/processor/ClassPathURIResolver.java b/components/camel-schematron/src/main/java/org/apache/camel/component/schematron/processor/ClassPathURIResolver.java
index db506f7..6fa2941 100644
--- a/components/camel-schematron/src/main/java/org/apache/camel/component/schematron/processor/ClassPathURIResolver.java
+++ b/components/camel-schematron/src/main/java/org/apache/camel/component/schematron/processor/ClassPathURIResolver.java
@@ -16,7 +16,6 @@
*/
package org.apache.camel.component.schematron.processor;
-import java.io.File;
import javax.xml.transform.Source;
import javax.xml.transform.TransformerException;
import javax.xml.transform.URIResolver;
@@ -41,6 +40,6 @@ public class ClassPathURIResolver implements URIResolver {
@Override
public Source resolve(String href, String base) throws TransformerException {
- return new StreamSource(ClassLoader.getSystemResourceAsStream(rulesDir.concat(File.separator).concat(href)));
+ return new StreamSource(ClassLoader.getSystemResourceAsStream(rulesDir.concat("/").concat(href)));
}
}