You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2017/11/27 08:17:30 UTC

[camel] branch master updated (ca7183a -> af62f9e)

This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git.


    from ca7183a  Regen
     new 63bf0b0  CAMEL-12039 - camel-itest - Errors in some test about xslt 1.0 mode
     new af62f9e  CAMEL-12030: Add CoAP response code header

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 components/camel-coap/src/main/docs/coap-component.adoc                | 3 +++
 .../camel-coap/src/main/java/org/apache/camel/coap/CoAPConstants.java  | 1 +
 .../camel-coap/src/main/java/org/apache/camel/coap/CoAPProducer.java   | 1 +
 .../src/test/java/org/apache/camel/coap/CoAPComponentTest.java         | 2 ++
 .../src/test/resources/org/apache/camel/itest/jetty/greeting.xsl       | 2 +-
 .../src/test/resources/org/apache/camel/itest/jetty/transform.xsl      | 2 +-
 6 files changed, 9 insertions(+), 2 deletions(-)

-- 
To stop receiving notification emails like this one, please contact
['"commits@camel.apache.org" <co...@camel.apache.org>'].

[camel] 01/02: CAMEL-12039 - camel-itest - Errors in some test about xslt 1.0 mode

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 63bf0b095ca5588d7e7d81a74dae547473d4c937
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Nov 27 09:15:10 2017 +0100

    CAMEL-12039 - camel-itest - Errors in some test about xslt 1.0 mode
---
 .../src/test/resources/org/apache/camel/itest/jetty/greeting.xsl        | 2 +-
 .../src/test/resources/org/apache/camel/itest/jetty/transform.xsl       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/camel-itest/src/test/resources/org/apache/camel/itest/jetty/greeting.xsl b/tests/camel-itest/src/test/resources/org/apache/camel/itest/jetty/greeting.xsl
index 3e8a8d2..9a6996e 100644
--- a/tests/camel-itest/src/test/resources/org/apache/camel/itest/jetty/greeting.xsl
+++ b/tests/camel-itest/src/test/resources/org/apache/camel/itest/jetty/greeting.xsl
@@ -15,7 +15,7 @@
     See the License for the specific language governing permissions and
     limitations under the License.
 -->
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 
   <xsl:template match="/">
     <goodbye>
diff --git a/tests/camel-itest/src/test/resources/org/apache/camel/itest/jetty/transform.xsl b/tests/camel-itest/src/test/resources/org/apache/camel/itest/jetty/transform.xsl
index fea1e63..3b2651a 100644
--- a/tests/camel-itest/src/test/resources/org/apache/camel/itest/jetty/transform.xsl
+++ b/tests/camel-itest/src/test/resources/org/apache/camel/itest/jetty/transform.xsl
@@ -17,7 +17,7 @@
 -->
 <xsl:stylesheet
   xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
-  version='1.0'>
+  version='2.0'>
 
   <xsl:output method="xml" indent="yes" encoding="ISO-8859-1"/>
 

-- 
To stop receiving notification emails like this one, please contact
"commits@camel.apache.org" <co...@camel.apache.org>.

[camel] 02/02: CAMEL-12030: Add CoAP response code header

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit af62f9ecf62604be0cea82b3afba57fbf9eb93d7
Author: James Netherton <ja...@gmail.com>
AuthorDate: Mon Nov 27 07:59:54 2017 +0000

    CAMEL-12030: Add CoAP response code header
---
 components/camel-coap/src/main/docs/coap-component.adoc                | 3 +++
 .../camel-coap/src/main/java/org/apache/camel/coap/CoAPConstants.java  | 1 +
 .../camel-coap/src/main/java/org/apache/camel/coap/CoAPProducer.java   | 1 +
 .../src/test/java/org/apache/camel/coap/CoAPComponentTest.java         | 2 ++
 4 files changed, 7 insertions(+)

diff --git a/components/camel-coap/src/main/docs/coap-component.adoc b/components/camel-coap/src/main/docs/coap-component.adoc
index e0f1481..80a435f 100644
--- a/components/camel-coap/src/main/docs/coap-component.adoc
+++ b/components/camel-coap/src/main/docs/coap-component.adoc
@@ -69,6 +69,9 @@ with the following path and query parameters:
 |`CamelCoapMethod` |`String` |The request method that the CoAP producer should use when calling the target CoAP
 server URI. Valid options are DELETE, GET, PING, POST & PUT.
 
+|`CamelCoapResponseCode` |`String` |The CoAP response code sent by the external server. See RFC 7252 for details
+of what each code means.
+
 |`CamelCoapUri` |`String` |The URI of a CoAP server to call. Will override any existing URI configured directly on the endpoint.
 |=======================================================================
 
diff --git a/components/camel-coap/src/main/java/org/apache/camel/coap/CoAPConstants.java b/components/camel-coap/src/main/java/org/apache/camel/coap/CoAPConstants.java
index bf44a20..9507186 100644
--- a/components/camel-coap/src/main/java/org/apache/camel/coap/CoAPConstants.java
+++ b/components/camel-coap/src/main/java/org/apache/camel/coap/CoAPConstants.java
@@ -39,5 +39,6 @@ public interface CoAPConstants {
      * CoAP exchange header names
      */
     String COAP_METHOD = "CamelCoapMethod";
+    String COAP_RESPONSE_CODE = "CamelCoapResponseCode";
     String COAP_URI = "CamelCoapUri";
 }
diff --git a/components/camel-coap/src/main/java/org/apache/camel/coap/CoAPProducer.java b/components/camel-coap/src/main/java/org/apache/camel/coap/CoAPProducer.java
index 99e46d5..4837193 100644
--- a/components/camel-coap/src/main/java/org/apache/camel/coap/CoAPProducer.java
+++ b/components/camel-coap/src/main/java/org/apache/camel/coap/CoAPProducer.java
@@ -74,6 +74,7 @@ public class CoAPProducer extends DefaultProducer {
             Message resp = exchange.getOut();
             String mt = MediaTypeRegistry.toString(response.getOptions().getContentFormat());
             resp.setHeader(org.apache.camel.Exchange.CONTENT_TYPE, mt);
+            resp.setHeader(CoAPConstants.COAP_RESPONSE_CODE, response.getCode().toString());
             resp.setBody(response.getPayload());
         }
 
diff --git a/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPComponentTest.java b/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPComponentTest.java
index 7e44884..a01b52d 100644
--- a/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPComponentTest.java
+++ b/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPComponentTest.java
@@ -25,6 +25,7 @@ import org.apache.camel.test.AvailablePortFinder;
 import org.apache.camel.test.junit4.CamelTestSupport;
 import org.eclipse.californium.core.CoapClient;
 import org.eclipse.californium.core.CoapResponse;
+import org.eclipse.californium.core.coap.CoAP;
 import org.eclipse.californium.core.coap.MediaTypeRegistry;
 import org.eclipse.californium.core.network.config.NetworkConfig;
 import org.junit.Test;
@@ -46,6 +47,7 @@ public class CoAPComponentTest extends CamelTestSupport {
         mock.expectedMinimumMessageCount(1);
         mock.expectedBodiesReceived("Hello Camel CoAP");
         mock.expectedHeaderReceived(Exchange.CONTENT_TYPE, MediaTypeRegistry.toString(MediaTypeRegistry.APPLICATION_OCTET_STREAM));
+        mock.expectedHeaderReceived(CoAPConstants.COAP_RESPONSE_CODE, CoAP.ResponseCode.CONTENT.toString());
         sender.sendBody("Camel CoAP");
         assertMockEndpointsSatisfied();
     }

-- 
To stop receiving notification emails like this one, please contact
"commits@camel.apache.org" <co...@camel.apache.org>.