This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch camel-4.4.x in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/camel-4.4.x by this push: new 5aa4c1a6320 CAMEL-21260: camel-cxf - Allow to configure synchronous on component level (#15693) 5aa4c1a6320 is described below commit 5aa4c1a6320e6c5e9bfeecd333980e2f06fb986e Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Wed Sep 25 11:17:26 2024 +0200 CAMEL-21260: camel-cxf - Allow to configure synchronous on component level (#15693) --- .../org/apache/camel/catalog/components/cxf.json | 9 +++++---- .../org/apache/camel/catalog/components/cxfrs.json | 7 ++++--- .../component/cxf/jaxrs/CxfRsComponentConfigurer.java | 3 +++ .../org/apache/camel/component/cxf/jaxrs/cxfrs.json | 7 ++++--- .../apache/camel/component/cxf/jaxrs/CxfRsComponent.java | 12 ++++++++++++ .../component/cxf/jaxws/CxfComponentConfigurer.java | 3 +++ .../org/apache/camel/component/cxf/jaxws/cxf.json | 9 +++++---- .../apache/camel/component/cxf/jaxws/CxfComponent.java | 12 ++++++++++++ .../apache/camel/component/cxf/jaxws/CxfEndpoint.java | 1 - .../component/dsl/CxfComponentBuilderFactory.java | 16 ++++++++++++++++ .../component/dsl/CxfrsComponentBuilderFactory.java | 16 ++++++++++++++++ 11 files changed, 80 insertions(+), 15 deletions(-) diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/cxf.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/cxf.json index 54865781ff8..95140e54e3b 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/cxf.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/cxf.json @@ -25,10 +25,11 @@ "componentProperties": { "bridgeErrorHandler": { "index": 0, "kind": "property", "displayName": "Bridge Error Handler", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the like [...] "lazyStartProducer": { "index": 1, "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail [...] - "allowStreaming": { "index": 2, "kind": "property", "displayName": "Allow Streaming", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "description": "This option controls whether the CXF component, when running in PAYLOAD mode, will DOM parse the incoming messages into DOM Elements or keep the payload as a javax.xml.transform.Source object that would allow stream [...] - "autowiredEnabled": { "index": 3, "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching t [...] - "headerFilterStrategy": { "index": 4, "kind": "property", "displayName": "Header Filter Strategy", "group": "filter", "label": "filter", "required": false, "type": "object", "javaType": "org.apache.camel.spi.HeaderFilterStrategy", "deprecated": false, "autowired": false, "secret": false, "description": "To use a custom org.apache.camel.spi.HeaderFilterStrategy to filter header to and from Camel message." }, - "useGlobalSslContextParameters": { "index": 5, "kind": "property", "displayName": "Use Global Ssl Context Parameters", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Enable usage of global SSL context parameters." } + "synchronous": { "index": 2, "kind": "property", "displayName": "Synchronous", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Sets whether synchronous processing should be strictly used" }, + "allowStreaming": { "index": 3, "kind": "property", "displayName": "Allow Streaming", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "description": "This option controls whether the CXF component, when running in PAYLOAD mode, will DOM parse the incoming messages into DOM Elements or keep the payload as a javax.xml.transform.Source object that would allow stream [...] + "autowiredEnabled": { "index": 4, "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching t [...] + "headerFilterStrategy": { "index": 5, "kind": "property", "displayName": "Header Filter Strategy", "group": "filter", "label": "filter", "required": false, "type": "object", "javaType": "org.apache.camel.spi.HeaderFilterStrategy", "deprecated": false, "autowired": false, "secret": false, "description": "To use a custom org.apache.camel.spi.HeaderFilterStrategy to filter header to and from Camel message." }, + "useGlobalSslContextParameters": { "index": 6, "kind": "property", "displayName": "Use Global Ssl Context Parameters", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Enable usage of global SSL context parameters." } }, "headers": { "operationName": { "index": 0, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the operation.", "constantName": "org.apache.camel.component.cxf.common.message.CxfConstants#OPERATION_NAME" }, diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/cxfrs.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/cxfrs.json index f0038b78dd5..cb2ca5782ba 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/cxfrs.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/cxfrs.json @@ -25,9 +25,10 @@ "componentProperties": { "bridgeErrorHandler": { "index": 0, "kind": "property", "displayName": "Bridge Error Handler", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the like [...] "lazyStartProducer": { "index": 1, "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail [...] - "autowiredEnabled": { "index": 2, "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching t [...] - "headerFilterStrategy": { "index": 3, "kind": "property", "displayName": "Header Filter Strategy", "group": "filter", "label": "filter", "required": false, "type": "object", "javaType": "org.apache.camel.spi.HeaderFilterStrategy", "deprecated": false, "autowired": false, "secret": false, "description": "To use a custom org.apache.camel.spi.HeaderFilterStrategy to filter header to and from Camel message." }, - "useGlobalSslContextParameters": { "index": 4, "kind": "property", "displayName": "Use Global Ssl Context Parameters", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Enable usage of global SSL context parameters." } + "synchronous": { "index": 2, "kind": "property", "displayName": "Synchronous", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Sets whether synchronous processing should be strictly used" }, + "autowiredEnabled": { "index": 3, "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching t [...] + "headerFilterStrategy": { "index": 4, "kind": "property", "displayName": "Header Filter Strategy", "group": "filter", "label": "filter", "required": false, "type": "object", "javaType": "org.apache.camel.spi.HeaderFilterStrategy", "deprecated": false, "autowired": false, "secret": false, "description": "To use a custom org.apache.camel.spi.HeaderFilterStrategy to filter header to and from Camel message." }, + "useGlobalSslContextParameters": { "index": 5, "kind": "property", "displayName": "Use Global Ssl Context Parameters", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Enable usage of global SSL context parameters." } }, "headers": { "operationName": { "index": 0, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the operation.", "constantName": "org.apache.camel.component.cxf.common.message.CxfConstants#OPERATION_NAME" }, diff --git a/components/camel-cxf/camel-cxf-rest/src/generated/java/org/apache/camel/component/cxf/jaxrs/CxfRsComponentConfigurer.java b/components/camel-cxf/camel-cxf-rest/src/generated/java/org/apache/camel/component/cxf/jaxrs/CxfRsComponentConfigurer.java index f9b342f9b5d..b11f307f3a1 100644 --- a/components/camel-cxf/camel-cxf-rest/src/generated/java/org/apache/camel/component/cxf/jaxrs/CxfRsComponentConfigurer.java +++ b/components/camel-cxf/camel-cxf-rest/src/generated/java/org/apache/camel/component/cxf/jaxrs/CxfRsComponentConfigurer.java @@ -29,6 +29,7 @@ public class CxfRsComponentConfigurer extends PropertyConfigurerSupport implemen case "headerFilterStrategy": target.setHeaderFilterStrategy(property(camelContext, org.apache.camel.spi.HeaderFilterStrategy.class, value)); return true; case "lazystartproducer": case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true; + case "synchronous": target.setSynchronous(property(camelContext, boolean.class, value)); return true; case "useglobalsslcontextparameters": case "useGlobalSslContextParameters": target.setUseGlobalSslContextParameters(property(camelContext, boolean.class, value)); return true; default: return false; @@ -46,6 +47,7 @@ public class CxfRsComponentConfigurer extends PropertyConfigurerSupport implemen case "headerFilterStrategy": return org.apache.camel.spi.HeaderFilterStrategy.class; case "lazystartproducer": case "lazyStartProducer": return boolean.class; + case "synchronous": return boolean.class; case "useglobalsslcontextparameters": case "useGlobalSslContextParameters": return boolean.class; default: return null; @@ -64,6 +66,7 @@ public class CxfRsComponentConfigurer extends PropertyConfigurerSupport implemen case "headerFilterStrategy": return target.getHeaderFilterStrategy(); case "lazystartproducer": case "lazyStartProducer": return target.isLazyStartProducer(); + case "synchronous": return target.isSynchronous(); case "useglobalsslcontextparameters": case "useGlobalSslContextParameters": return target.isUseGlobalSslContextParameters(); default: return null; diff --git a/components/camel-cxf/camel-cxf-rest/src/generated/resources/org/apache/camel/component/cxf/jaxrs/cxfrs.json b/components/camel-cxf/camel-cxf-rest/src/generated/resources/org/apache/camel/component/cxf/jaxrs/cxfrs.json index f0038b78dd5..cb2ca5782ba 100644 --- a/components/camel-cxf/camel-cxf-rest/src/generated/resources/org/apache/camel/component/cxf/jaxrs/cxfrs.json +++ b/components/camel-cxf/camel-cxf-rest/src/generated/resources/org/apache/camel/component/cxf/jaxrs/cxfrs.json @@ -25,9 +25,10 @@ "componentProperties": { "bridgeErrorHandler": { "index": 0, "kind": "property", "displayName": "Bridge Error Handler", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the like [...] "lazyStartProducer": { "index": 1, "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail [...] - "autowiredEnabled": { "index": 2, "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching t [...] - "headerFilterStrategy": { "index": 3, "kind": "property", "displayName": "Header Filter Strategy", "group": "filter", "label": "filter", "required": false, "type": "object", "javaType": "org.apache.camel.spi.HeaderFilterStrategy", "deprecated": false, "autowired": false, "secret": false, "description": "To use a custom org.apache.camel.spi.HeaderFilterStrategy to filter header to and from Camel message." }, - "useGlobalSslContextParameters": { "index": 4, "kind": "property", "displayName": "Use Global Ssl Context Parameters", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Enable usage of global SSL context parameters." } + "synchronous": { "index": 2, "kind": "property", "displayName": "Synchronous", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Sets whether synchronous processing should be strictly used" }, + "autowiredEnabled": { "index": 3, "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching t [...] + "headerFilterStrategy": { "index": 4, "kind": "property", "displayName": "Header Filter Strategy", "group": "filter", "label": "filter", "required": false, "type": "object", "javaType": "org.apache.camel.spi.HeaderFilterStrategy", "deprecated": false, "autowired": false, "secret": false, "description": "To use a custom org.apache.camel.spi.HeaderFilterStrategy to filter header to and from Camel message." }, + "useGlobalSslContextParameters": { "index": 5, "kind": "property", "displayName": "Use Global Ssl Context Parameters", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Enable usage of global SSL context parameters." } }, "headers": { "operationName": { "index": 0, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the operation.", "constantName": "org.apache.camel.component.cxf.common.message.CxfConstants#OPERATION_NAME" }, diff --git a/components/camel-cxf/camel-cxf-rest/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsComponent.java b/components/camel-cxf/camel-cxf-rest/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsComponent.java index dd4bf523919..54fd825de02 100644 --- a/components/camel-cxf/camel-cxf-rest/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsComponent.java +++ b/components/camel-cxf/camel-cxf-rest/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsComponent.java @@ -44,6 +44,9 @@ public class CxfRsComponent extends HeaderFilterStrategyComponent implements SSL @Metadata(label = "security", defaultValue = "false") private boolean useGlobalSslContextParameters; + @Metadata(defaultValue = "false", label = "producer,advanced", + description = "Sets whether synchronous processing should be strictly used") + private boolean synchronous; public CxfRsComponent() { } @@ -110,6 +113,7 @@ public class CxfRsComponent extends HeaderFilterStrategyComponent implements SSL // endpoint URI does not specify a bean answer = new CxfRsEndpoint(remaining, this); } + answer.setSynchronous(isSynchronous()); String resourceClass = getAndRemoveParameter(parameters, "resourceClass", String.class); if (resourceClass != null) { @@ -157,4 +161,12 @@ public class CxfRsComponent extends HeaderFilterStrategyComponent implements SSL public void setUseGlobalSslContextParameters(boolean useGlobalSslContextParameters) { this.useGlobalSslContextParameters = useGlobalSslContextParameters; } + + public boolean isSynchronous() { + return synchronous; + } + + public void setSynchronous(boolean synchronous) { + this.synchronous = synchronous; + } } diff --git a/components/camel-cxf/camel-cxf-soap/src/generated/java/org/apache/camel/component/cxf/jaxws/CxfComponentConfigurer.java b/components/camel-cxf/camel-cxf-soap/src/generated/java/org/apache/camel/component/cxf/jaxws/CxfComponentConfigurer.java index 7a26eef8e42..d7317cc8fc3 100644 --- a/components/camel-cxf/camel-cxf-soap/src/generated/java/org/apache/camel/component/cxf/jaxws/CxfComponentConfigurer.java +++ b/components/camel-cxf/camel-cxf-soap/src/generated/java/org/apache/camel/component/cxf/jaxws/CxfComponentConfigurer.java @@ -31,6 +31,7 @@ public class CxfComponentConfigurer extends PropertyConfigurerSupport implements case "headerFilterStrategy": target.setHeaderFilterStrategy(property(camelContext, org.apache.camel.spi.HeaderFilterStrategy.class, value)); return true; case "lazystartproducer": case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true; + case "synchronous": target.setSynchronous(property(camelContext, boolean.class, value)); return true; case "useglobalsslcontextparameters": case "useGlobalSslContextParameters": target.setUseGlobalSslContextParameters(property(camelContext, boolean.class, value)); return true; default: return false; @@ -50,6 +51,7 @@ public class CxfComponentConfigurer extends PropertyConfigurerSupport implements case "headerFilterStrategy": return org.apache.camel.spi.HeaderFilterStrategy.class; case "lazystartproducer": case "lazyStartProducer": return boolean.class; + case "synchronous": return boolean.class; case "useglobalsslcontextparameters": case "useGlobalSslContextParameters": return boolean.class; default: return null; @@ -70,6 +72,7 @@ public class CxfComponentConfigurer extends PropertyConfigurerSupport implements case "headerFilterStrategy": return target.getHeaderFilterStrategy(); case "lazystartproducer": case "lazyStartProducer": return target.isLazyStartProducer(); + case "synchronous": return target.isSynchronous(); case "useglobalsslcontextparameters": case "useGlobalSslContextParameters": return target.isUseGlobalSslContextParameters(); default: return null; diff --git a/components/camel-cxf/camel-cxf-soap/src/generated/resources/org/apache/camel/component/cxf/jaxws/cxf.json b/components/camel-cxf/camel-cxf-soap/src/generated/resources/org/apache/camel/component/cxf/jaxws/cxf.json index 54865781ff8..95140e54e3b 100644 --- a/components/camel-cxf/camel-cxf-soap/src/generated/resources/org/apache/camel/component/cxf/jaxws/cxf.json +++ b/components/camel-cxf/camel-cxf-soap/src/generated/resources/org/apache/camel/component/cxf/jaxws/cxf.json @@ -25,10 +25,11 @@ "componentProperties": { "bridgeErrorHandler": { "index": 0, "kind": "property", "displayName": "Bridge Error Handler", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the like [...] "lazyStartProducer": { "index": 1, "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail [...] - "allowStreaming": { "index": 2, "kind": "property", "displayName": "Allow Streaming", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "description": "This option controls whether the CXF component, when running in PAYLOAD mode, will DOM parse the incoming messages into DOM Elements or keep the payload as a javax.xml.transform.Source object that would allow stream [...] - "autowiredEnabled": { "index": 3, "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching t [...] - "headerFilterStrategy": { "index": 4, "kind": "property", "displayName": "Header Filter Strategy", "group": "filter", "label": "filter", "required": false, "type": "object", "javaType": "org.apache.camel.spi.HeaderFilterStrategy", "deprecated": false, "autowired": false, "secret": false, "description": "To use a custom org.apache.camel.spi.HeaderFilterStrategy to filter header to and from Camel message." }, - "useGlobalSslContextParameters": { "index": 5, "kind": "property", "displayName": "Use Global Ssl Context Parameters", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Enable usage of global SSL context parameters." } + "synchronous": { "index": 2, "kind": "property", "displayName": "Synchronous", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Sets whether synchronous processing should be strictly used" }, + "allowStreaming": { "index": 3, "kind": "property", "displayName": "Allow Streaming", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "description": "This option controls whether the CXF component, when running in PAYLOAD mode, will DOM parse the incoming messages into DOM Elements or keep the payload as a javax.xml.transform.Source object that would allow stream [...] + "autowiredEnabled": { "index": 4, "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching t [...] + "headerFilterStrategy": { "index": 5, "kind": "property", "displayName": "Header Filter Strategy", "group": "filter", "label": "filter", "required": false, "type": "object", "javaType": "org.apache.camel.spi.HeaderFilterStrategy", "deprecated": false, "autowired": false, "secret": false, "description": "To use a custom org.apache.camel.spi.HeaderFilterStrategy to filter header to and from Camel message." }, + "useGlobalSslContextParameters": { "index": 6, "kind": "property", "displayName": "Use Global Ssl Context Parameters", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Enable usage of global SSL context parameters." } }, "headers": { "operationName": { "index": 0, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the operation.", "constantName": "org.apache.camel.component.cxf.common.message.CxfConstants#OPERATION_NAME" }, diff --git a/components/camel-cxf/camel-cxf-soap/src/main/java/org/apache/camel/component/cxf/jaxws/CxfComponent.java b/components/camel-cxf/camel-cxf-soap/src/main/java/org/apache/camel/component/cxf/jaxws/CxfComponent.java index db04fb573cf..232adc5a61b 100644 --- a/components/camel-cxf/camel-cxf-soap/src/main/java/org/apache/camel/component/cxf/jaxws/CxfComponent.java +++ b/components/camel-cxf/camel-cxf-soap/src/main/java/org/apache/camel/component/cxf/jaxws/CxfComponent.java @@ -43,6 +43,9 @@ public class CxfComponent extends HeaderFilterStrategyComponent implements SSLCo private Boolean allowStreaming; @Metadata(label = "security", defaultValue = "false") private boolean useGlobalSslContextParameters; + @Metadata(defaultValue = "false", label = "producer,advanced", + description = "Sets whether synchronous processing should be strictly used") + private boolean synchronous; private Map<String, BeanCacheEntry> beanCache = new HashMap<>(); @@ -79,6 +82,14 @@ public class CxfComponent extends HeaderFilterStrategyComponent implements SSLCo this.useGlobalSslContextParameters = useGlobalSslContextParameters; } + public boolean isSynchronous() { + return synchronous; + } + + public void setSynchronous(boolean synchronous) { + this.synchronous = synchronous; + } + /** * Create a {@link CxfEndpoint} which, can be a Spring bean endpoint having URI format cxf:bean:<i>beanId</i> or * transport address endpoint having URI format cxf://<i>transportAddress</i>. @@ -132,6 +143,7 @@ public class CxfComponent extends HeaderFilterStrategyComponent implements SSLCo } result.setComponent(this); result.setCamelContext(getCamelContext()); + result.setSynchronous(isSynchronous()); setEndpointHeaderFilterStrategy(result); setProperties(result, parameters); diff --git a/components/camel-cxf/camel-cxf-soap/src/main/java/org/apache/camel/component/cxf/jaxws/CxfEndpoint.java b/components/camel-cxf/camel-cxf-soap/src/main/java/org/apache/camel/component/cxf/jaxws/CxfEndpoint.java index c1b2d7a8511..f33b4d706c7 100644 --- a/components/camel-cxf/camel-cxf-soap/src/main/java/org/apache/camel/component/cxf/jaxws/CxfEndpoint.java +++ b/components/camel-cxf/camel-cxf-soap/src/main/java/org/apache/camel/component/cxf/jaxws/CxfEndpoint.java @@ -216,7 +216,6 @@ public class CxfEndpoint extends DefaultEndpoint implements AsyncEndpoint, Heade @UriParam(defaultValue = "false", label = "producer,advanced", description = "Sets whether synchronous processing should be strictly used") private boolean synchronous; - @UriParam(defaultValue = "false", label = "advanced", description = "Enable schema validation for request and response. Disabled by default for performance reason") private Boolean schemaValidationEnabled; diff --git a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/CxfComponentBuilderFactory.java b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/CxfComponentBuilderFactory.java index 8d0714c5b1c..55eadda1d03 100644 --- a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/CxfComponentBuilderFactory.java +++ b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/CxfComponentBuilderFactory.java @@ -100,6 +100,21 @@ public interface CxfComponentBuilderFactory { doSetProperty("lazyStartProducer", lazyStartProducer); return this; } + /** + * Sets whether synchronous processing should be strictly used. + * + * The option is a: <code>boolean</code> type. + * + * Default: false + * Group: producer (advanced) + * + * @param synchronous the value to set + * @return the dsl builder + */ + default CxfComponentBuilder synchronous(boolean synchronous) { + doSetProperty("synchronous", synchronous); + return this; + } /** * This option controls whether the CXF component, when running in * PAYLOAD mode, will DOM parse the incoming messages into DOM Elements @@ -191,6 +206,7 @@ public interface CxfComponentBuilderFactory { switch (name) { case "bridgeErrorHandler": ((CxfComponent) component).setBridgeErrorHandler((boolean) value); return true; case "lazyStartProducer": ((CxfComponent) component).setLazyStartProducer((boolean) value); return true; + case "synchronous": ((CxfComponent) component).setSynchronous((boolean) value); return true; case "allowStreaming": ((CxfComponent) component).setAllowStreaming((java.lang.Boolean) value); return true; case "autowiredEnabled": ((CxfComponent) component).setAutowiredEnabled((boolean) value); return true; case "headerFilterStrategy": ((CxfComponent) component).setHeaderFilterStrategy((org.apache.camel.spi.HeaderFilterStrategy) value); return true; diff --git a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/CxfrsComponentBuilderFactory.java b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/CxfrsComponentBuilderFactory.java index 26112f9fd4a..3dc97e9c320 100644 --- a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/CxfrsComponentBuilderFactory.java +++ b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/CxfrsComponentBuilderFactory.java @@ -101,6 +101,21 @@ public interface CxfrsComponentBuilderFactory { doSetProperty("lazyStartProducer", lazyStartProducer); return this; } + /** + * Sets whether synchronous processing should be strictly used. + * + * The option is a: <code>boolean</code> type. + * + * Default: false + * Group: producer (advanced) + * + * @param synchronous the value to set + * @return the dsl builder + */ + default CxfrsComponentBuilder synchronous(boolean synchronous) { + doSetProperty("synchronous", synchronous); + return this; + } /** * Whether autowiring is enabled. This is used for automatic autowiring * options (the option must be marked as autowired) by looking up in the @@ -174,6 +189,7 @@ public interface CxfrsComponentBuilderFactory { switch (name) { case "bridgeErrorHandler": ((CxfRsComponent) component).setBridgeErrorHandler((boolean) value); return true; case "lazyStartProducer": ((CxfRsComponent) component).setLazyStartProducer((boolean) value); return true; + case "synchronous": ((CxfRsComponent) component).setSynchronous((boolean) value); return true; case "autowiredEnabled": ((CxfRsComponent) component).setAutowiredEnabled((boolean) value); return true; case "headerFilterStrategy": ((CxfRsComponent) component).setHeaderFilterStrategy((org.apache.camel.spi.HeaderFilterStrategy) value); return true; case "useGlobalSslContextParameters": ((CxfRsComponent) component).setUseGlobalSslContextParameters((boolean) value); return true;