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 2021/08/30 20:43:34 UTC

[camel] branch main updated (c164e20 -> 9769348)

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

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


    from c164e20  Set pulsar redelivery count in exchange headers (#6008)
     new dd4a715  CAMEL-16863: camel-spring-ws - The created exchange should be InOut
     new 9769348  CAMEL-16863: WireTap EIP should preserve OUT when copy mode.

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:
 .../apache/camel/component/spring/ws/SpringWebserviceConsumer.java   | 3 ---
 .../apache/camel/component/spring/ws/SpringWebserviceEndpoint.java   | 3 +++
 .../src/main/java/org/apache/camel/processor/WireTapProcessor.java   | 5 +++++
 3 files changed, 8 insertions(+), 3 deletions(-)

[camel] 01/02: CAMEL-16863: camel-spring-ws - The created exchange should be InOut

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

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

commit dd4a715fce31ed4f9407520f52c18b77e1d65322
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Mon Aug 30 22:24:12 2021 +0200

    CAMEL-16863: camel-spring-ws - The created exchange should be InOut
---
 .../org/apache/camel/component/spring/ws/SpringWebserviceConsumer.java | 3 ---
 .../org/apache/camel/component/spring/ws/SpringWebserviceEndpoint.java | 3 +++
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/components/camel-spring-ws/src/main/java/org/apache/camel/component/spring/ws/SpringWebserviceConsumer.java b/components/camel-spring-ws/src/main/java/org/apache/camel/component/spring/ws/SpringWebserviceConsumer.java
index abebef4..90fff58 100644
--- a/components/camel-spring-ws/src/main/java/org/apache/camel/component/spring/ws/SpringWebserviceConsumer.java
+++ b/components/camel-spring-ws/src/main/java/org/apache/camel/component/spring/ws/SpringWebserviceConsumer.java
@@ -27,7 +27,6 @@ import javax.xml.transform.Source;
 
 import org.apache.camel.Endpoint;
 import org.apache.camel.Exchange;
-import org.apache.camel.ExchangePattern;
 import org.apache.camel.ExtendedExchange;
 import org.apache.camel.Message;
 import org.apache.camel.Processor;
@@ -63,7 +62,6 @@ public class SpringWebserviceConsumer extends DefaultConsumer implements Message
     public void invoke(MessageContext messageContext) throws Exception {
         Exchange exchange = createExchange(false);
         try {
-            exchange.setPattern(ExchangePattern.InOptionalOut);
             populateExchangeFromMessageContext(messageContext, exchange);
 
             // populate camel exchange with breadcrumb from transport header
@@ -189,7 +187,6 @@ public class SpringWebserviceConsumer extends DefaultConsumer implements Message
                     SoapHeaderElement element = elementIter.next();
                     QName name = element.getName();
                     headers.put(name.getLocalPart(), element);
-
                 }
             }
         }
diff --git a/components/camel-spring-ws/src/main/java/org/apache/camel/component/spring/ws/SpringWebserviceEndpoint.java b/components/camel-spring-ws/src/main/java/org/apache/camel/component/spring/ws/SpringWebserviceEndpoint.java
index 5d9f387..004cf95 100644
--- a/components/camel-spring-ws/src/main/java/org/apache/camel/component/spring/ws/SpringWebserviceEndpoint.java
+++ b/components/camel-spring-ws/src/main/java/org/apache/camel/component/spring/ws/SpringWebserviceEndpoint.java
@@ -19,6 +19,7 @@ package org.apache.camel.component.spring.ws;
 import org.apache.camel.Category;
 import org.apache.camel.Component;
 import org.apache.camel.Consumer;
+import org.apache.camel.ExchangePattern;
 import org.apache.camel.Processor;
 import org.apache.camel.Producer;
 import org.apache.camel.spi.UriEndpoint;
@@ -39,6 +40,7 @@ public class SpringWebserviceEndpoint extends DefaultEndpoint {
     public SpringWebserviceEndpoint(Component component, String uri, SpringWebserviceConfiguration configuration) {
         super(uri, component);
         this.configuration = configuration;
+        setExchangePattern(ExchangePattern.InOut);
     }
 
     @Override
@@ -59,4 +61,5 @@ public class SpringWebserviceEndpoint extends DefaultEndpoint {
     public SpringWebserviceConfiguration getConfiguration() {
         return configuration;
     }
+
 }

[camel] 02/02: CAMEL-16863: WireTap EIP should preserve OUT when copy mode.

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

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

commit 976934878a6cec252fa3c27d02c1149cd870e267
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Mon Aug 30 22:33:37 2021 +0200

    CAMEL-16863: WireTap EIP should preserve OUT when copy mode.
---
 .../src/main/java/org/apache/camel/processor/WireTapProcessor.java   | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/core/camel-core-processor/src/main/java/org/apache/camel/processor/WireTapProcessor.java b/core/camel-core-processor/src/main/java/org/apache/camel/processor/WireTapProcessor.java
index f90f7f2..96e27fc 100644
--- a/core/camel-core-processor/src/main/java/org/apache/camel/processor/WireTapProcessor.java
+++ b/core/camel-core-processor/src/main/java/org/apache/camel/processor/WireTapProcessor.java
@@ -279,6 +279,11 @@ public class WireTapProcessor extends AsyncProcessorSupport
         Exchange copy = processorExchangeFactory.createCorrelatedCopy(exchange, false);
         // set MEP to InOnly as this wire tap is a fire and forget
         copy.setPattern(ExchangePattern.InOnly);
+        // move OUT to IN if needed
+        if (copy.hasOut()) {
+            copy.setIn(copy.getOut());
+            copy.setOut(null);
+        }
         // remove STREAM_CACHE_UNIT_OF_WORK property because this wire tap will
         // close its own created stream cache(s)
         copy.removeProperty(ExchangePropertyKey.STREAM_CACHE_UNIT_OF_WORK);