You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by pp...@apache.org on 2022/10/25 07:36:30 UTC

[camel-quarkus] branch main updated (f4fd0f9c6a -> 3836ce84ac)

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

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


    from f4fd0f9c6a Fix nightly sync workflow build failure reporting on Windows
     new cc373de5b4 camel-quarkus-cxf-soap should depend on quarkus-cxf-rt-features-logging
     new f63845777d Rename ws-security test to-ws-security-client test, better separate package names, test names and property names among the individual cxf test modules so that they do not clash when run together
     new ee81de170a [closes #4203] Add tests for CXF SOAP MTOM
     new 3836ce84ac Test WS-Security server with UsernameToken

The 4 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:
 extensions/cxf-soap/deployment/pom.xml             |   4 +
 .../cxf/soap/deployment/CxfSoapProcessor.java      |  20 ++-
 extensions/cxf-soap/runtime/pom.xml                |   4 +
 ...oapResource.java => CxfSoapClientResource.java} |   4 +-
 ...CxfSoapRoutes.java => CxfSoapClientRoutes.java} |   2 +-
 .../cxf/soap/client/it/CxfSoapClientTest.java      |   4 +-
 .../cxf-soap/cxf-soap-mtom/README.adoc             |   4 +
 .../controlbus => cxf-soap/cxf-soap-mtom}/pom.xml  |  36 +++---
 .../cxf/soap/mtom/it/CxfSoapMtomResource.java      |  88 +++++++++++++
 .../cxf/soap/mtom/it/CxfSoapMtomRoutes.java        | 141 +++++++++++++++++++++
 .../component/cxf/soap/mtom/it/IImageService.java} |  18 +--
 .../component/cxf/soap/mtom/it/ImageService.java   |  63 +++++++++
 .../cxf/soap/mtom/it/MtomAttachmentChecker.java    |  96 ++++++++++++++
 .../src/main/resources/application.properties      |   0
 .../component/cxf/soap/mtom/it/CxfSoapMtomIT.java} |   5 +-
 .../cxf/soap/mtom/it/CxfSoapMtomTest.java          |  83 ++++++++++++
 .../src/test/resources/linux-image.png             | Bin 0 -> 38982 bytes
 .../README.adoc                                    |   0
 .../pom.xml                                        |   6 +-
 .../wss/client/it/CxfSoapWssClientResource.java}   |   6 +-
 .../wss/client/it/CxfSoapWssClientRoutes.java}     |   8 +-
 .../cxf/soap/wss/client}/it/PasswordCallback.java  |   6 +-
 .../src/main/resources/application.properties      |   0
 .../main/resources/wsdl/WssCalculatorService.wsdl  |   0
 .../cxf/soap/wss/client/it/CxfSoapWssClientIT.java |   5 +-
 .../soap/wss/client/it/CxfSoapWssClientTest.java}  |  10 +-
 .../wss/client/it/CxfWssClientTestResource.java}   |  12 +-
 .../cxf-soap-ws-security-server}/pom.xml           |  24 ++--
 .../soap/wss/server/it/CxfSoapWssServerRoutes.java | 101 +++++++++++++++
 .../cxf/soap/wss/server/it/WssRounderService.java  |  22 ++--
 .../src/main/resources/application.properties      |   2 +-
 .../cxf/soap/wss/server/it/CxfSoapWssServerIT.java |   5 +-
 .../soap/wss/server/it/CxfSoapWssServerTest.java   | 129 +++++++++++++++++++
 .../wss/server/it/CxfWssServerTestResource.java    |  14 +-
 .../cxf/soap/security/it/CxfSoapClientIT.java      |  23 ----
 integration-test-groups/cxf-soap/pom.xml           |   4 +-
 integration-tests/cxf-soap-grouped/pom.xml         |  26 +++-
 poms/bom-test/pom.xml                              |   7 +
 38 files changed, 860 insertions(+), 122 deletions(-)
 rename integration-test-groups/cxf-soap/cxf-soap-client/src/main/java/org/apache/camel/quarkus/component/cxf/soap/client/it/{CxfSoapResource.java => CxfSoapClientResource.java} (97%)
 rename integration-test-groups/cxf-soap/cxf-soap-client/src/main/java/org/apache/camel/quarkus/component/cxf/soap/client/it/{CxfSoapRoutes.java => CxfSoapClientRoutes.java} (97%)
 create mode 100644 integration-test-groups/cxf-soap/cxf-soap-mtom/README.adoc
 copy integration-test-groups/{foundation/controlbus => cxf-soap/cxf-soap-mtom}/pom.xml (87%)
 create mode 100644 integration-test-groups/cxf-soap/cxf-soap-mtom/src/main/java/org/apache/camel/quarkus/component/cxf/soap/mtom/it/CxfSoapMtomResource.java
 create mode 100644 integration-test-groups/cxf-soap/cxf-soap-mtom/src/main/java/org/apache/camel/quarkus/component/cxf/soap/mtom/it/CxfSoapMtomRoutes.java
 copy integration-test-groups/{foundation/core-languages/src/main/java/org/apache/camel/quarkus/core/languages/it/HeaderLanguageRoutes.java => cxf-soap/cxf-soap-mtom/src/main/java/org/apache/camel/quarkus/component/cxf/soap/mtom/it/IImageService.java} (72%)
 create mode 100644 integration-test-groups/cxf-soap/cxf-soap-mtom/src/main/java/org/apache/camel/quarkus/component/cxf/soap/mtom/it/ImageService.java
 create mode 100644 integration-test-groups/cxf-soap/cxf-soap-mtom/src/main/java/org/apache/camel/quarkus/component/cxf/soap/mtom/it/MtomAttachmentChecker.java
 rename integration-test-groups/cxf-soap/{cxf-soap-ws-security => cxf-soap-mtom}/src/main/resources/application.properties (100%)
 copy integration-test-groups/{aws2/aws2-cw/src/test/java/org/apache/camel/quarkus/component/aws2/cw/it/Aws2CwIT.java => cxf-soap/cxf-soap-mtom/src/test/java/org/apache/camel/quarkus/component/cxf/soap/mtom/it/CxfSoapMtomIT.java} (89%)
 create mode 100644 integration-test-groups/cxf-soap/cxf-soap-mtom/src/test/java/org/apache/camel/quarkus/component/cxf/soap/mtom/it/CxfSoapMtomTest.java
 create mode 100644 integration-test-groups/cxf-soap/cxf-soap-mtom/src/test/resources/linux-image.png
 rename integration-test-groups/cxf-soap/{cxf-soap-ws-security => cxf-soap-ws-security-client}/README.adoc (100%)
 rename integration-test-groups/cxf-soap/{cxf-soap-ws-security => cxf-soap-ws-security-client}/pom.xml (97%)
 rename integration-test-groups/cxf-soap/{cxf-soap-ws-security/src/main/java/org/apache/camel/quarkus/component/cxf/soap/security/it/CxfSoapResource.java => cxf-soap-ws-security-client/src/main/java/org/apache/camel/quarkus/component/cxf/soap/wss/client/it/CxfSoapWssClientResource.java} (92%)
 rename integration-test-groups/cxf-soap/{cxf-soap-ws-security/src/main/java/org/apache/camel/quarkus/component/cxf/soap/security/it/CxfSoapRoutes.java => cxf-soap-ws-security-client/src/main/java/org/apache/camel/quarkus/component/cxf/soap/wss/client/it/CxfSoapWssClientRoutes.java} (92%)
 rename integration-test-groups/cxf-soap/{cxf-soap-ws-security/src/main/java/org/apache/camel/quarkus/component/cxf/soap/security => cxf-soap-ws-security-client/src/main/java/org/apache/camel/quarkus/component/cxf/soap/wss/client}/it/PasswordCallback.java (92%)
 copy integration-test-groups/cxf-soap/{cxf-soap-client => cxf-soap-ws-security-client}/src/main/resources/application.properties (100%)
 rename integration-test-groups/cxf-soap/{cxf-soap-ws-security => cxf-soap-ws-security-client}/src/main/resources/wsdl/WssCalculatorService.wsdl (100%)
 copy integration-tests/pg-replication-slot/src/test/java/org/apache/camel/quarkus/component/pg/replication/slot/it/PgReplicationSlotIT.java => integration-test-groups/cxf-soap/cxf-soap-ws-security-client/src/test/java/org/apache/camel/quarkus/component/cxf/soap/wss/client/it/CxfSoapWssClientIT.java (87%)
 rename integration-test-groups/cxf-soap/{cxf-soap-ws-security/src/test/java/org/apache/camel/quarkus/component/cxf/soap/security/it/CxfSoapClientTest.java => cxf-soap-ws-security-client/src/test/java/org/apache/camel/quarkus/component/cxf/soap/wss/client/it/CxfSoapWssClientTest.java} (92%)
 rename integration-test-groups/cxf-soap/{cxf-soap-ws-security/src/test/java/org/apache/camel/quarkus/component/cxf/soap/security/it/CxfClientTestResource.java => cxf-soap-ws-security-client/src/test/java/org/apache/camel/quarkus/component/cxf/soap/wss/client/it/CxfWssClientTestResource.java} (86%)
 copy integration-test-groups/{aws2/aws2-ddb => cxf-soap/cxf-soap-ws-security-server}/pom.xml (86%)
 create mode 100644 integration-test-groups/cxf-soap/cxf-soap-ws-security-server/src/main/java/org/apache/camel/quarkus/component/cxf/soap/wss/server/it/CxfSoapWssServerRoutes.java
 copy integration-tests/opentelemetry/src/main/java/org/apache/camel/quarkus/component/opentelemetry/it/GreetingsBean.java => integration-test-groups/cxf-soap/cxf-soap-ws-security-server/src/main/java/org/apache/camel/quarkus/component/cxf/soap/wss/server/it/WssRounderService.java (66%)
 copy {integration-tests/master => integration-test-groups/cxf-soap/cxf-soap-ws-security-server}/src/main/resources/application.properties (96%)
 copy integration-tests/pg-replication-slot/src/test/java/org/apache/camel/quarkus/component/pg/replication/slot/it/PgReplicationSlotIT.java => integration-test-groups/cxf-soap/cxf-soap-ws-security-server/src/test/java/org/apache/camel/quarkus/component/cxf/soap/wss/server/it/CxfSoapWssServerIT.java (87%)
 create mode 100644 integration-test-groups/cxf-soap/cxf-soap-ws-security-server/src/test/java/org/apache/camel/quarkus/component/cxf/soap/wss/server/it/CxfSoapWssServerTest.java
 copy integration-tests/sap-netweaver/src/test/java/org/apache/camel/quarkus/component/sap/netweaver/it/SapNetweaverTestResource.java => integration-test-groups/cxf-soap/cxf-soap-ws-security-server/src/test/java/org/apache/camel/quarkus/component/cxf/soap/wss/server/it/CxfWssServerTestResource.java (73%)
 delete mode 100644 integration-test-groups/cxf-soap/cxf-soap-ws-security/src/test/java/org/apache/camel/quarkus/component/cxf/soap/security/it/CxfSoapClientIT.java


[camel-quarkus] 03/04: [closes #4203] Add tests for CXF SOAP MTOM

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

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

commit ee81de170a064185cbddd2c92a3a0ddd605757eb
Author: Lukas Lowinger <ll...@redhat.com>
AuthorDate: Thu Oct 20 13:31:42 2022 +0200

    [closes #4203] Add tests for CXF SOAP MTOM
---
 .../cxf/soap/deployment/CxfSoapProcessor.java      |  20 ++-
 .../cxf-soap/cxf-soap-mtom/README.adoc             |   4 +
 .../cxf-soap/cxf-soap-mtom/pom.xml                 | 150 +++++++++++++++++++++
 .../cxf/soap/mtom/it/CxfSoapMtomResource.java      |  88 ++++++++++++
 .../cxf/soap/mtom/it/CxfSoapMtomRoutes.java        | 141 +++++++++++++++++++
 .../component/cxf/soap/mtom/it/IImageService.java  |  33 +++++
 .../component/cxf/soap/mtom/it/ImageService.java   |  63 +++++++++
 .../cxf/soap/mtom/it/MtomAttachmentChecker.java    |  96 +++++++++++++
 .../src/main/resources/application.properties      |  19 +++
 .../component/cxf/soap/mtom/it/CxfSoapMtomIT.java  |  23 ++++
 .../cxf/soap/mtom/it/CxfSoapMtomTest.java          |  83 ++++++++++++
 .../src/test/resources/linux-image.png             | Bin 0 -> 38982 bytes
 integration-test-groups/cxf-soap/pom.xml           |   1 +
 integration-tests/cxf-soap-grouped/pom.xml         |  16 ++-
 14 files changed, 732 insertions(+), 5 deletions(-)

diff --git a/extensions/cxf-soap/deployment/src/main/java/org/apache/camel/quarkus/component/cxf/soap/deployment/CxfSoapProcessor.java b/extensions/cxf-soap/deployment/src/main/java/org/apache/camel/quarkus/component/cxf/soap/deployment/CxfSoapProcessor.java
index 17f76a9365..0e9985491f 100644
--- a/extensions/cxf-soap/deployment/src/main/java/org/apache/camel/quarkus/component/cxf/soap/deployment/CxfSoapProcessor.java
+++ b/extensions/cxf-soap/deployment/src/main/java/org/apache/camel/quarkus/component/cxf/soap/deployment/CxfSoapProcessor.java
@@ -25,6 +25,8 @@ import io.quarkus.deployment.builditem.CombinedIndexBuildItem;
 import io.quarkus.deployment.builditem.FeatureBuildItem;
 import io.quarkus.deployment.builditem.SystemPropertyBuildItem;
 import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
+import io.quarkus.deployment.builditem.nativeimage.ReflectiveMethodBuildItem;
+import io.quarkus.deployment.builditem.nativeimage.RuntimeInitializedClassBuildItem;
 import org.jboss.jandex.DotName;
 import org.jboss.jandex.IndexView;
 
@@ -43,7 +45,10 @@ class CxfSoapProcessor {
     }
 
     @BuildStep
-    void registerForReflection(BuildProducer<ReflectiveClassBuildItem> reflectiveClass, CombinedIndexBuildItem combinedIndex) {
+    void registerForReflection(
+            CombinedIndexBuildItem combinedIndex,
+            BuildProducer<ReflectiveClassBuildItem> reflectiveClass,
+            BuildProducer<ReflectiveMethodBuildItem> reflectiveMethods) {
 
         IndexView index = combinedIndex.getIndex();
 
@@ -55,6 +60,19 @@ class CxfSoapProcessor {
                 .map(className -> new ReflectiveClassBuildItem(false, false, className))
                 .forEach(reflectiveClass::produce);
 
+        reflectiveMethods.produce(new ReflectiveMethodBuildItem("org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory",
+                "getServiceFactory", new String[0]));
+
+    }
+
+    @BuildStep
+    void registerForReflection(
+            BuildProducer<RuntimeInitializedClassBuildItem> runtimeInitializedClasses) {
+
+        // TODO: Move to quarkus-cxf
+        runtimeInitializedClasses
+                .produce(new RuntimeInitializedClassBuildItem("com.sun.xml.messaging.saaj.soap.StringDataContentHandler"));
+
     }
 
     @BuildStep
diff --git a/integration-test-groups/cxf-soap/cxf-soap-mtom/README.adoc b/integration-test-groups/cxf-soap/cxf-soap-mtom/README.adoc
new file mode 100644
index 0000000000..dac25bdb6f
--- /dev/null
+++ b/integration-test-groups/cxf-soap/cxf-soap-mtom/README.adoc
@@ -0,0 +1,4 @@
+= Camel Quarkus CXF SOAP MTOM tests
+
+Tests are not using any external SOAP services (eg. via testcontainers). They purely test if Camel Quarkus is able to send and consume messages with attachments with both MTOM enabled/disabled.
+
diff --git a/integration-test-groups/cxf-soap/cxf-soap-mtom/pom.xml b/integration-test-groups/cxf-soap/cxf-soap-mtom/pom.xml
new file mode 100644
index 0000000000..4214e253a0
--- /dev/null
+++ b/integration-test-groups/cxf-soap/cxf-soap-mtom/pom.xml
@@ -0,0 +1,150 @@
+<?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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.camel.quarkus</groupId>
+        <artifactId>camel-quarkus-build-parent-it</artifactId>
+        <version>2.14.0-SNAPSHOT</version>
+        <relativePath>../../../poms/build-parent-it/pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-integration-test-cxf-soap-mtom</artifactId>
+    <name>Camel Quarkus :: Integration Tests :: Cxf Soap Mtom</name>
+    <description>Integration tests for Camel Quarkus CXF extension Mtom</description>
+
+    <dependencies>
+        <dependency><!-- for java.awt.Image -->
+            <groupId>io.quarkus</groupId>
+            <artifactId>quarkus-awt</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>io.quarkus</groupId>
+            <artifactId>quarkus-resteasy</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-bean</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-direct</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-cxf-soap</artifactId>
+        </dependency>
+
+
+        <!-- test dependencies -->
+        <dependency>
+            <groupId>io.quarkus</groupId>
+            <artifactId>quarkus-junit5</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>io.rest-assured</groupId>
+            <artifactId>rest-assured</artifactId>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+    <profiles>
+        <profile>
+            <id>native</id>
+            <activation>
+                <property>
+                    <name>native</name>
+                </property>
+            </activation>
+            <properties>
+                <quarkus.package.type>native</quarkus.package.type>
+            </properties>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-failsafe-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <goals>
+                                    <goal>integration-test</goal>
+                                    <goal>verify</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+        <profile>
+            <id>virtualDependencies</id>
+            <activation>
+                <property>
+                    <name>!noVirtualDependencies</name>
+                </property>
+            </activation>
+            <dependencies>
+                <!-- The following dependencies guarantee that this module is built after them. You can update them by running `mvn process-resources -Pformat -N` from the source tree root directory -->
+                <dependency>
+                    <groupId>org.apache.camel.quarkus</groupId>
+                    <artifactId>camel-quarkus-bean</artifactId>
+                    <version>${project.version}</version>
+                    <type>pom</type>
+                    <scope>test</scope>
+                    <exclusions>
+                        <exclusion>
+                            <groupId>*</groupId>
+                            <artifactId>*</artifactId>
+                        </exclusion>
+                    </exclusions>
+                </dependency>
+                <dependency>
+                    <groupId>org.apache.camel.quarkus</groupId>
+                    <artifactId>camel-quarkus-cxf-soap-deployment</artifactId>
+                    <version>${project.version}</version>
+                    <type>pom</type>
+                    <scope>test</scope>
+                    <exclusions>
+                        <exclusion>
+                            <groupId>*</groupId>
+                            <artifactId>*</artifactId>
+                        </exclusion>
+                    </exclusions>
+                </dependency>
+                <dependency>
+                    <groupId>org.apache.camel.quarkus</groupId>
+                    <artifactId>camel-quarkus-direct-deployment</artifactId>
+                    <version>${project.version}</version>
+                    <type>pom</type>
+                    <scope>test</scope>
+                    <exclusions>
+                        <exclusion>
+                            <groupId>*</groupId>
+                            <artifactId>*</artifactId>
+                        </exclusion>
+                    </exclusions>
+                </dependency>
+            </dependencies>
+        </profile>
+    </profiles>
+
+</project>
diff --git a/integration-test-groups/cxf-soap/cxf-soap-mtom/src/main/java/org/apache/camel/quarkus/component/cxf/soap/mtom/it/CxfSoapMtomResource.java b/integration-test-groups/cxf-soap/cxf-soap-mtom/src/main/java/org/apache/camel/quarkus/component/cxf/soap/mtom/it/CxfSoapMtomResource.java
new file mode 100644
index 0000000000..4a4b08ed08
--- /dev/null
+++ b/integration-test-groups/cxf-soap/cxf-soap-mtom/src/main/java/org/apache/camel/quarkus/component/cxf/soap/mtom/it/CxfSoapMtomResource.java
@@ -0,0 +1,88 @@
+/*
+ * 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.quarkus.component.cxf.soap.mtom.it;
+
+import java.awt.*;
+import java.awt.image.BufferedImage;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.net.URI;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.imageio.ImageIO;
+import javax.inject.Inject;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+
+import org.apache.camel.ProducerTemplate;
+
+import static org.apache.camel.component.cxf.common.message.CxfConstants.OPERATION_NAME;
+
+@Path("/cxf-soap/mtom")
+@ApplicationScoped
+public class CxfSoapMtomResource {
+
+    @Inject
+    ProducerTemplate producerTemplate;
+
+    @Path("/upload")
+    @POST
+    @Produces(MediaType.TEXT_PLAIN)
+    public Response upload(@QueryParam("imageName") String imageName, @QueryParam("mtomEnabled") boolean mtomEnabled,
+            byte[] image) throws Exception {
+        try (ByteArrayInputStream bais = new ByteArrayInputStream(image)) {
+            final String response = producerTemplate.requestBodyAndHeader(
+                    "direct:" + mtomEndpoint(mtomEnabled),
+                    new Object[] { ImageIO.read(bais), imageName },
+                    OPERATION_NAME, "uploadImage", String.class);
+            return Response
+                    .created(new URI("https://camel.apache.org/"))
+                    .entity(response)
+                    .build();
+        }
+    }
+
+    @Path("/download")
+    @POST
+    @Consumes(MediaType.TEXT_PLAIN)
+    public Response download(@QueryParam("imageName") String imageName, @QueryParam("mtomEnabled") boolean mtomEnabled)
+            throws Exception {
+        final BufferedImage response = (BufferedImage) producerTemplate.requestBodyAndHeader(
+                "direct:" + mtomEndpoint(mtomEnabled),
+                imageName,
+                OPERATION_NAME,
+                "downloadImage", Image.class);
+        try (ByteArrayOutputStream baos = new ByteArrayOutputStream()) {
+            ImageIO.write(response, "png", baos);
+            byte[] bytes = baos.toByteArray();
+            return Response
+                    .created(new URI("https://camel.apache.org/"))
+                    .entity(bytes)
+                    .build();
+        }
+    }
+
+    private String mtomEndpoint(boolean mtomEnabled) {
+        return mtomEnabled ? "mtomEnabledInvoker" : "mtomDisabledInvoker";
+    }
+
+}
diff --git a/integration-test-groups/cxf-soap/cxf-soap-mtom/src/main/java/org/apache/camel/quarkus/component/cxf/soap/mtom/it/CxfSoapMtomRoutes.java b/integration-test-groups/cxf-soap/cxf-soap-mtom/src/main/java/org/apache/camel/quarkus/component/cxf/soap/mtom/it/CxfSoapMtomRoutes.java
new file mode 100644
index 0000000000..a7f454a035
--- /dev/null
+++ b/integration-test-groups/cxf-soap/cxf-soap-mtom/src/main/java/org/apache/camel/quarkus/component/cxf/soap/mtom/it/CxfSoapMtomRoutes.java
@@ -0,0 +1,141 @@
+/*
+ * 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.quarkus.component.cxf.soap.mtom.it;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.enterprise.inject.Produces;
+import javax.inject.Inject;
+import javax.inject.Named;
+import javax.xml.ws.handler.Handler;
+
+import io.quarkus.runtime.LaunchMode;
+import org.apache.camel.Exchange;
+import org.apache.camel.Processor;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.cxf.jaxws.CxfEndpoint;
+import org.apache.cxf.ext.logging.LoggingFeature;
+import org.apache.cxf.message.MessageContentsList;
+import org.eclipse.microprofile.config.Config;
+import org.eclipse.microprofile.config.ConfigProvider;
+
+@ApplicationScoped
+public class CxfSoapMtomRoutes extends RouteBuilder {
+
+    @Inject
+    @Named("loggingMtomFeatureClient")
+    LoggingFeature loggingFeature;
+
+    @Override
+    public void configure() {
+
+        from("direct:mtomEnabledInvoker")
+                .to("cxf:bean:soapMtomEnabledClientEndpoint?dataFormat=POJO");
+
+        from("direct:mtomDisabledInvoker")
+                .to("cxf:bean:soapMtomDisabledClientEndpoint?dataFormat=POJO");
+
+        from("cxf:bean:soapMtomEnabledServerEndpoint?dataFormat=POJO")
+                .to("direct:processImage");
+
+        from("cxf:bean:soapMtomDisabledServerEndpoint?dataFormat=POJO")
+                .to("direct:processImage");
+
+        from("direct:processImage")
+                .process("imageServiceProcessor")
+                .recipientList((simple("bean:imageService?method=${header.operationName}")));
+
+    }
+
+    @ApplicationScoped
+    @Named("imageServiceProcessor")
+    static class ImageServiceProcessor implements Processor {
+        @Override
+        public void process(Exchange exchange) throws Exception {
+            String operationName = (String) exchange.getIn().getHeaders().get("operationName");
+            MessageContentsList list = (MessageContentsList) exchange.getIn().getBody();
+            if ("uploadImage".equals(operationName)) {
+                exchange.getIn().getHeaders().put("image", list.get(0));
+                exchange.getIn().getHeaders().put("imageName", list.get(1));
+                exchange.getIn().getHeaders()
+                        .put("operationName", "uploadImage(${header.image},${header.imageName})");
+            } else if ("downloadImage".equals(operationName)) {
+                exchange.getIn().setBody(list.get(0));
+            }
+        }
+
+    }
+
+    @Produces
+    @ApplicationScoped
+    @Named("loggingMtomFeatureClient")
+    public LoggingFeature loggingFeature() {
+        final LoggingFeature result = new LoggingFeature();
+        result.setPrettyLogging(true);
+        return result;
+    }
+
+    @Produces
+    @ApplicationScoped
+    @Named
+    CxfEndpoint soapMtomEnabledClientEndpoint() {
+        return commonCxfEndpoint(true, getServerUrl() + "/soapservice/mtom-enabled-image-service");
+    }
+
+    @Produces
+    @ApplicationScoped
+    @Named
+    CxfEndpoint soapMtomDisabledClientEndpoint() {
+        return commonCxfEndpoint(false, getServerUrl() + "/soapservice/mtom-disabled-image-service");
+    }
+
+    @Produces
+    @ApplicationScoped
+    @Named
+    CxfEndpoint soapMtomEnabledServerEndpoint() {
+        return commonCxfEndpoint(true, "/mtom-enabled-image-service");
+    }
+
+    @Produces
+    @ApplicationScoped
+    @Named
+    CxfEndpoint soapMtomDisabledServerEndpoint() {
+        return commonCxfEndpoint(false, "/mtom-disabled-image-service");
+    }
+
+    CxfEndpoint commonCxfEndpoint(boolean mtomEnabled, String address) {
+        final CxfEndpoint result = new CxfEndpoint();
+        result.getFeatures().add(loggingFeature);
+        result.setServiceClass(IImageService.class);
+        result.setMtomEnabled(mtomEnabled);
+        result.setAddress(address);
+        List<Handler> handlers = new ArrayList<>();
+        handlers.add(new MtomAttachmentChecker(mtomEnabled));
+        result.setHandlers(handlers);
+        return result;
+    }
+
+    private static String getServerUrl() {
+        Config config = ConfigProvider.getConfig();
+        final int port = LaunchMode.current().equals(LaunchMode.TEST) ? config.getValue("quarkus.http.test-port", Integer.class)
+                : config.getValue("quarkus.http.port", Integer.class);
+        return String.format("http://localhost:%d", port);
+    }
+
+}
diff --git a/integration-test-groups/cxf-soap/cxf-soap-mtom/src/main/java/org/apache/camel/quarkus/component/cxf/soap/mtom/it/IImageService.java b/integration-test-groups/cxf-soap/cxf-soap-mtom/src/main/java/org/apache/camel/quarkus/component/cxf/soap/mtom/it/IImageService.java
new file mode 100644
index 0000000000..3340c2cfbf
--- /dev/null
+++ b/integration-test-groups/cxf-soap/cxf-soap-mtom/src/main/java/org/apache/camel/quarkus/component/cxf/soap/mtom/it/IImageService.java
@@ -0,0 +1,33 @@
+/*
+ * 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.quarkus.component.cxf.soap.mtom.it;
+
+import java.awt.*;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+
+@WebService
+public interface IImageService {
+
+    @WebMethod
+    Image downloadImage(String name);
+
+    @WebMethod
+    String uploadImage(Image image, String name);
+
+}
diff --git a/integration-test-groups/cxf-soap/cxf-soap-mtom/src/main/java/org/apache/camel/quarkus/component/cxf/soap/mtom/it/ImageService.java b/integration-test-groups/cxf-soap/cxf-soap-mtom/src/main/java/org/apache/camel/quarkus/component/cxf/soap/mtom/it/ImageService.java
new file mode 100644
index 0000000000..93ec42986d
--- /dev/null
+++ b/integration-test-groups/cxf-soap/cxf-soap-mtom/src/main/java/org/apache/camel/quarkus/component/cxf/soap/mtom/it/ImageService.java
@@ -0,0 +1,63 @@
+/*
+ * 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.quarkus.component.cxf.soap.mtom.it;
+
+import java.awt.*;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.inject.Named;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@ApplicationScoped
+@Named("imageService")
+public class ImageService implements IImageService {
+
+    public static final String MSG_SUCCESS = "Upload Successful";
+    private static final Logger log = LoggerFactory.getLogger(ImageService.class);
+
+    private final Map<String, Image> imageRepository;
+
+    public ImageService() {
+        imageRepository = new ConcurrentHashMap<>();
+    }
+
+    @Override
+    public Image downloadImage(String name) {
+        final Image image = imageRepository.get(name);
+        if (image == null) {
+            throw new IllegalStateException("Image with name " + name + " does not exist.");
+        }
+        return image;
+    }
+
+    @Override
+    public String uploadImage(Image image, String name) {
+
+        log.info("Upload image: " + image + " with name: " + name);
+
+        if (image != null && name != null && !"".equals(name)) {
+            imageRepository.put(name, image);
+            return MSG_SUCCESS;
+        }
+        throw new IllegalStateException("Illegal Data Format.");
+    }
+
+}
diff --git a/integration-test-groups/cxf-soap/cxf-soap-mtom/src/main/java/org/apache/camel/quarkus/component/cxf/soap/mtom/it/MtomAttachmentChecker.java b/integration-test-groups/cxf-soap/cxf-soap-mtom/src/main/java/org/apache/camel/quarkus/component/cxf/soap/mtom/it/MtomAttachmentChecker.java
new file mode 100644
index 0000000000..d8eefeafce
--- /dev/null
+++ b/integration-test-groups/cxf-soap/cxf-soap-mtom/src/main/java/org/apache/camel/quarkus/component/cxf/soap/mtom/it/MtomAttachmentChecker.java
@@ -0,0 +1,96 @@
+/*
+ * 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.quarkus.component.cxf.soap.mtom.it;
+
+import java.util.Collections;
+import java.util.Set;
+
+import javax.xml.namespace.QName;
+import javax.xml.soap.SOAPBody;
+import javax.xml.soap.SOAPEnvelope;
+import javax.xml.soap.SOAPException;
+import javax.xml.ws.WebServiceException;
+import javax.xml.ws.handler.MessageContext;
+import javax.xml.ws.handler.soap.SOAPHandler;
+import javax.xml.ws.handler.soap.SOAPMessageContext;
+
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+/**
+ * Asserts whether the attachment is present where expected (inline or multipart body) throws an IllegalStateException
+ * to signal that something is wrong.
+ */
+public class MtomAttachmentChecker implements SOAPHandler<SOAPMessageContext> {
+    boolean mtomEnabled;
+
+    public MtomAttachmentChecker(boolean mtomEnabled) {
+        this.mtomEnabled = mtomEnabled;
+    }
+
+    static boolean walk(String localName, NodeList nodes) {
+        boolean found = false;
+        for (int i = 0; i < nodes.getLength(); i++) {
+            Node n = nodes.item(i);
+            if (localName.equals(n.getLocalName())) {
+                found = true;
+                break;
+            } else if (!found) {
+                found = walk(localName, n.getChildNodes());
+            }
+        }
+
+        return found;
+    }
+
+    @Override
+    public boolean handleMessage(SOAPMessageContext msgContext) {
+        try {
+            SOAPEnvelope envelope = msgContext.getMessage().getSOAPPart().getEnvelope();
+            SOAPBody body = envelope.getBody();
+            boolean found = walk("Include", body.getChildNodes());
+            if (mtomEnabled) {
+                // skip those messages which don't have attachments
+                boolean skip = walk("uploadImageResponse", body.getChildNodes()) || walk("downloadImage", body.getChildNodes());
+                if (!skip && !found) {
+                    throw new IllegalStateException("The SOAP message should contain an <xop:Include> element");
+                }
+            } else if (found) {
+                throw new IllegalStateException("The SOAP message shouldn't contain an <xop:Include> element");
+            }
+
+        } catch (SOAPException ex) {
+            throw new WebServiceException(ex);
+        }
+
+        return true;
+    }
+
+    @Override
+    public boolean handleFault(SOAPMessageContext context) {
+        return true;
+    }
+
+    @Override
+    public void close(MessageContext context) {
+    }
+
+    @Override
+    public Set<QName> getHeaders() {
+        return Collections.emptySet();
+    }
+}
diff --git a/integration-test-groups/cxf-soap/cxf-soap-mtom/src/main/resources/application.properties b/integration-test-groups/cxf-soap/cxf-soap-mtom/src/main/resources/application.properties
new file mode 100644
index 0000000000..574727024a
--- /dev/null
+++ b/integration-test-groups/cxf-soap/cxf-soap-mtom/src/main/resources/application.properties
@@ -0,0 +1,19 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+
+quarkus.cxf.path=/soapservice
+quarkus.native.resources.includes = wsdl/*.wsdl
diff --git a/integration-test-groups/cxf-soap/cxf-soap-mtom/src/test/java/org/apache/camel/quarkus/component/cxf/soap/mtom/it/CxfSoapMtomIT.java b/integration-test-groups/cxf-soap/cxf-soap-mtom/src/test/java/org/apache/camel/quarkus/component/cxf/soap/mtom/it/CxfSoapMtomIT.java
new file mode 100644
index 0000000000..6da4ad90da
--- /dev/null
+++ b/integration-test-groups/cxf-soap/cxf-soap-mtom/src/test/java/org/apache/camel/quarkus/component/cxf/soap/mtom/it/CxfSoapMtomIT.java
@@ -0,0 +1,23 @@
+/*
+ * 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.quarkus.component.cxf.soap.mtom.it;
+
+import io.quarkus.test.junit.QuarkusIntegrationTest;
+
+@QuarkusIntegrationTest
+class CxfSoapMtomIT extends CxfSoapMtomTest {
+}
diff --git a/integration-test-groups/cxf-soap/cxf-soap-mtom/src/test/java/org/apache/camel/quarkus/component/cxf/soap/mtom/it/CxfSoapMtomTest.java b/integration-test-groups/cxf-soap/cxf-soap-mtom/src/test/java/org/apache/camel/quarkus/component/cxf/soap/mtom/it/CxfSoapMtomTest.java
new file mode 100644
index 0000000000..9fdc27c1f8
--- /dev/null
+++ b/integration-test-groups/cxf-soap/cxf-soap-mtom/src/test/java/org/apache/camel/quarkus/component/cxf/soap/mtom/it/CxfSoapMtomTest.java
@@ -0,0 +1,83 @@
+/*
+ * 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.quarkus.component.cxf.soap.mtom.it;
+
+import java.awt.image.BufferedImage;
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+
+import javax.imageio.ImageIO;
+
+import io.quarkus.test.junit.DisabledOnIntegrationTest;
+import io.quarkus.test.junit.QuarkusTest;
+import io.restassured.RestAssured;
+import io.restassured.http.ContentType;
+import org.hamcrest.CoreMatchers;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.ValueSource;
+
+@QuarkusTest
+class CxfSoapMtomTest {
+
+    @DisabledOnIntegrationTest("https://github.com/apache/camel-quarkus/issues/4208")
+    @ParameterizedTest
+    @ValueSource(booleans = { true, false })
+    public void uploadDownloadMtom(boolean mtomEnabled) throws IOException {
+        byte[] imageBytes = CxfSoapMtomTest.class.getClassLoader().getResourceAsStream("linux-image.png").readAllBytes();
+        String imageName = "linux-image-name";
+        RestAssured.given()
+                .contentType(ContentType.BINARY)
+                .queryParam("imageName", imageName)
+                .queryParam("mtomEnabled", mtomEnabled)
+                .body(imageBytes)
+                .post("/cxf-soap/mtom/upload")
+                .then()
+                .statusCode(201)
+                .body(CoreMatchers.equalTo(ImageService.MSG_SUCCESS));
+        byte[] downloadedImageBytes = RestAssured.given()
+                .contentType(ContentType.TEXT)
+                .queryParam("imageName", imageName)
+                .queryParam("mtomEnabled", mtomEnabled)
+                .post("/cxf-soap/mtom/download")
+                .then()
+                .statusCode(201)
+                .extract().asByteArray();
+
+        try (ByteArrayInputStream imageBais = new ByteArrayInputStream(
+                imageBytes); ByteArrayInputStream downloadedImageBais = new ByteArrayInputStream(downloadedImageBytes)) {
+            Assertions.assertTrue(bufferedImagesEqual(ImageIO.read(imageBais),
+                    ImageIO.read(downloadedImageBais)), "Uploaded image should match downloaded");
+        }
+    }
+
+    // copied from https://stackoverflow.com/a/15305092
+    boolean bufferedImagesEqual(BufferedImage img1, BufferedImage img2) {
+        if (img1.getWidth() == img2.getWidth() && img1.getHeight() == img2.getHeight()) {
+            for (int x = 0; x < img1.getWidth(); x++) {
+                for (int y = 0; y < img1.getHeight(); y++) {
+                    if (img1.getRGB(x, y) != img2.getRGB(x, y))
+                        return false;
+                }
+            }
+        } else {
+            return false;
+        }
+        return true;
+    }
+
+}
diff --git a/integration-test-groups/cxf-soap/cxf-soap-mtom/src/test/resources/linux-image.png b/integration-test-groups/cxf-soap/cxf-soap-mtom/src/test/resources/linux-image.png
new file mode 100644
index 0000000000..17d7bfef0d
Binary files /dev/null and b/integration-test-groups/cxf-soap/cxf-soap-mtom/src/test/resources/linux-image.png differ
diff --git a/integration-test-groups/cxf-soap/pom.xml b/integration-test-groups/cxf-soap/pom.xml
index dcdd0f90c9..86bd49e0e9 100644
--- a/integration-test-groups/cxf-soap/pom.xml
+++ b/integration-test-groups/cxf-soap/pom.xml
@@ -38,6 +38,7 @@
     <modules>
         <!-- extensions a..z; do not remove this comment, it is important when sorting via  mvn process-resources -Pformat -->
         <module>cxf-soap-client</module>
+        <module>cxf-soap-mtom</module>
         <module>cxf-soap-server</module>
         <module>cxf-soap-ws-security-client</module>
     </modules>
diff --git a/integration-tests/cxf-soap-grouped/pom.xml b/integration-tests/cxf-soap-grouped/pom.xml
index 4457d2b6d3..9aa35d3b06 100644
--- a/integration-tests/cxf-soap-grouped/pom.xml
+++ b/integration-tests/cxf-soap-grouped/pom.xml
@@ -32,6 +32,14 @@
 
     <!-- Regenerate the dependencies via `mvn process-resources -Pformat -N` from the source tree root directory -->
     <dependencies>
+        <dependency>
+            <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-bean</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-direct</artifactId>
+        </dependency>
         <dependency>
             <groupId>org.apache.camel.quarkus</groupId>
             <artifactId>camel-quarkus-cxf-soap</artifactId>
@@ -48,13 +56,13 @@
             <groupId>org.apache.commons</groupId>
             <artifactId>commons-lang3</artifactId>
         </dependency>
-        <dependency>
+        <dependency><!-- for java.awt.Image -->
             <groupId>io.quarkus</groupId>
-            <artifactId>quarkus-resteasy</artifactId>
+            <artifactId>quarkus-awt</artifactId>
         </dependency>
         <dependency>
-            <groupId>org.apache.camel.quarkus</groupId>
-            <artifactId>camel-quarkus-direct</artifactId>
+            <groupId>io.quarkus</groupId>
+            <artifactId>quarkus-resteasy</artifactId>
         </dependency>
 
         <!-- test dependencies -->


[camel-quarkus] 04/04: Test WS-Security server with UsernameToken

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

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

commit 3836ce84ac1e238383afde9637659f9d0eca3410
Author: Peter Palaga <pp...@redhat.com>
AuthorDate: Mon Oct 24 17:56:42 2022 +0200

    Test WS-Security server with UsernameToken
---
 .../cxf-soap/cxf-soap-ws-security-server/pom.xml   | 135 +++++++++++++++++++++
 .../soap/wss/server/it/CxfSoapWssServerRoutes.java | 101 +++++++++++++++
 .../cxf/soap/wss/server/it/WssRounderService.java  |  32 +++++
 .../src/main/resources/application.properties      |  18 +++
 .../cxf/soap/wss/server/it/CxfSoapWssServerIT.java |  23 ++++
 .../soap/wss/server/it/CxfSoapWssServerTest.java   | 129 ++++++++++++++++++++
 .../wss/server/it/CxfWssServerTestResource.java    |  38 ++++++
 integration-test-groups/cxf-soap/pom.xml           |   1 +
 integration-tests/cxf-soap-grouped/pom.xml         |  10 ++
 poms/bom-test/pom.xml                              |   7 ++
 10 files changed, 494 insertions(+)

diff --git a/integration-test-groups/cxf-soap/cxf-soap-ws-security-server/pom.xml b/integration-test-groups/cxf-soap/cxf-soap-ws-security-server/pom.xml
new file mode 100644
index 0000000000..4ede5c6b49
--- /dev/null
+++ b/integration-test-groups/cxf-soap/cxf-soap-ws-security-server/pom.xml
@@ -0,0 +1,135 @@
+<?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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.camel.quarkus</groupId>
+        <artifactId>camel-quarkus-build-parent-it</artifactId>
+        <version>2.14.0-SNAPSHOT</version>
+        <relativePath>../../../poms/build-parent-it/pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-integration-test-cxf-soap-ws-security-server</artifactId>
+    <name>Camel Quarkus :: Integration Tests :: CXF SOAP WS-Security server</name>
+    <description>Integration tests for Camel Quarkus CXF extension acting as SOAP server having WS-Security enabled</description>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-cxf-soap</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>io.quarkiverse.cxf</groupId>
+            <artifactId>quarkus-cxf-rt-ws-security</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>io.quarkus</groupId>
+            <artifactId>quarkus-resteasy</artifactId>
+        </dependency>
+
+        <!-- test dependencies -->
+        <dependency>
+            <groupId>io.quarkus</groupId>
+            <artifactId>quarkus-junit5</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>io.rest-assured</groupId>
+            <artifactId>rest-assured</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>io.quarkiverse.cxf</groupId>
+            <artifactId>quarkus-cxf-test-util</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.assertj</groupId>
+            <artifactId>assertj-core</artifactId>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+    <profiles>
+        <profile>
+            <id>native</id>
+            <activation>
+                <property>
+                    <name>native</name>
+                </property>
+            </activation>
+            <properties>
+                <quarkus.package.type>native</quarkus.package.type>
+            </properties>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-failsafe-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <goals>
+                                    <goal>integration-test</goal>
+                                    <goal>verify</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+        <profile>
+            <id>virtualDependencies</id>
+            <activation>
+                <property>
+                    <name>!noVirtualDependencies</name>
+                </property>
+            </activation>
+            <dependencies>
+                <!-- The following dependencies guarantee that this module is built after them. You can update them by running `mvn process-resources -Pformat -N` from the source tree root directory -->
+                <dependency>
+                    <groupId>org.apache.camel.quarkus</groupId>
+                    <artifactId>camel-quarkus-cxf-soap-deployment</artifactId>
+                    <version>${project.version}</version>
+                    <type>pom</type>
+                    <scope>test</scope>
+                    <exclusions>
+                        <exclusion>
+                            <groupId>*</groupId>
+                            <artifactId>*</artifactId>
+                        </exclusion>
+                    </exclusions>
+                </dependency>
+            </dependencies>
+        </profile>
+        <profile>
+            <id>skip-testcontainers-tests</id>
+            <activation>
+                <property>
+                    <name>skip-testcontainers-tests</name>
+                </property>
+            </activation>
+            <properties>
+                <skipTests>true</skipTests>
+            </properties>
+        </profile>
+    </profiles>
+
+</project>
diff --git a/integration-test-groups/cxf-soap/cxf-soap-ws-security-server/src/main/java/org/apache/camel/quarkus/component/cxf/soap/wss/server/it/CxfSoapWssServerRoutes.java b/integration-test-groups/cxf-soap/cxf-soap-ws-security-server/src/main/java/org/apache/camel/quarkus/component/cxf/soap/wss/server/it/CxfSoapWssServerRoutes.java
new file mode 100644
index 0000000000..ab2a7b6cf6
--- /dev/null
+++ b/integration-test-groups/cxf-soap/cxf-soap-ws-security-server/src/main/java/org/apache/camel/quarkus/component/cxf/soap/wss/server/it/CxfSoapWssServerRoutes.java
@@ -0,0 +1,101 @@
+/*
+ * 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.quarkus.component.cxf.soap.wss.server.it;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.enterprise.inject.Produces;
+import javax.inject.Named;
+import javax.security.auth.callback.Callback;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.callback.UnsupportedCallbackException;
+
+import org.apache.camel.Message;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.cxf.jaxws.CxfEndpoint;
+import org.apache.cxf.ext.logging.LoggingFeature;
+import org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor;
+import org.apache.wss4j.common.ConfigurationConstants;
+import org.apache.wss4j.common.ext.WSPasswordCallback;
+import org.eclipse.microprofile.config.inject.ConfigProperty;
+
+@ApplicationScoped
+public class CxfSoapWssServerRoutes extends RouteBuilder {
+
+    /** Produced in CxfWssServerTestResource */
+    @ConfigProperty(name = "camel-quarkus.wss.server.username", defaultValue = "cxf")
+    String username;
+
+    /** Produced in CxfWssServerTestResource */
+    @ConfigProperty(name = "camel-quarkus.wss.server.password", defaultValue = "pwd")
+    String password;
+
+    @Override
+    public void configure() {
+
+        from("cxf:bean:wssRounderService?dataFormat=POJO")
+                .log("exchange: ${exchange}")
+                .process(exchange -> {
+                    final Message message = exchange.getMessage();
+                    final double body = message.getBody(double.class);
+                    message.setBody(Math.round(body));
+                });
+
+    }
+
+    @Produces
+    @ApplicationScoped
+    @Named
+    CxfEndpoint wssRounderService() {
+        final CxfEndpoint result = new CxfEndpoint();
+        result.setServiceClass(WssRounderService.class);
+        result.setAddress("/rounder");
+
+        final LoggingFeature lf = new LoggingFeature();
+        lf.setPrettyLogging(true);
+        result.getFeatures().add(lf);
+
+        final CallbackHandler passwordCallback = new CallbackHandler() {
+            @Override
+            public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException {
+                for (Callback callback : callbacks) {
+                    if (callback instanceof WSPasswordCallback) {
+                        final WSPasswordCallback pc = (WSPasswordCallback) callback;
+                        if (username.equals(pc.getIdentifier())) {
+                            pc.setPassword(password);
+                            return;
+                        }
+                        break;
+                    }
+                }
+            }
+        };
+
+        final Map<String, Object> props = new HashMap<>();
+        props.put(ConfigurationConstants.ACTION, "UsernameToken");
+        props.put(ConfigurationConstants.PASSWORD_TYPE, "PasswordText");
+        props.put(ConfigurationConstants.USER, username);
+        props.put(ConfigurationConstants.PW_CALLBACK_REF, passwordCallback);
+        result.getInInterceptors().add(new WSS4JInInterceptor(props));
+
+        return result;
+    }
+
+}
diff --git a/integration-test-groups/cxf-soap/cxf-soap-ws-security-server/src/main/java/org/apache/camel/quarkus/component/cxf/soap/wss/server/it/WssRounderService.java b/integration-test-groups/cxf-soap/cxf-soap-ws-security-server/src/main/java/org/apache/camel/quarkus/component/cxf/soap/wss/server/it/WssRounderService.java
new file mode 100644
index 0000000000..49b7e8109e
--- /dev/null
+++ b/integration-test-groups/cxf-soap/cxf-soap-ws-security-server/src/main/java/org/apache/camel/quarkus/component/cxf/soap/wss/server/it/WssRounderService.java
@@ -0,0 +1,32 @@
+/*
+ * 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.quarkus.component.cxf.soap.wss.server.it;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+
+/**
+ */
+@WebService(targetNamespace = WssRounderService.TARGET_NS, name = "WssRounderService", serviceName = "WssRounderService")
+public interface WssRounderService {
+
+    public static final String TARGET_NS = "http://it.server.wss.soap.cxf.component.quarkus.camel.apache.org/";
+
+    @WebMethod
+    public long round(double a);
+
+}
diff --git a/integration-test-groups/cxf-soap/cxf-soap-ws-security-server/src/main/resources/application.properties b/integration-test-groups/cxf-soap/cxf-soap-ws-security-server/src/main/resources/application.properties
new file mode 100644
index 0000000000..2eaadf41fb
--- /dev/null
+++ b/integration-test-groups/cxf-soap/cxf-soap-ws-security-server/src/main/resources/application.properties
@@ -0,0 +1,18 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+
+quarkus.cxf.path=/soapservice
diff --git a/integration-test-groups/cxf-soap/cxf-soap-ws-security-server/src/test/java/org/apache/camel/quarkus/component/cxf/soap/wss/server/it/CxfSoapWssServerIT.java b/integration-test-groups/cxf-soap/cxf-soap-ws-security-server/src/test/java/org/apache/camel/quarkus/component/cxf/soap/wss/server/it/CxfSoapWssServerIT.java
new file mode 100644
index 0000000000..1de2c2c32a
--- /dev/null
+++ b/integration-test-groups/cxf-soap/cxf-soap-ws-security-server/src/test/java/org/apache/camel/quarkus/component/cxf/soap/wss/server/it/CxfSoapWssServerIT.java
@@ -0,0 +1,23 @@
+/*
+ * 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.quarkus.component.cxf.soap.wss.server.it;
+
+import io.quarkus.test.junit.QuarkusIntegrationTest;
+
+@QuarkusIntegrationTest
+class CxfSoapWssServerIT extends CxfSoapWssServerTest {
+}
diff --git a/integration-test-groups/cxf-soap/cxf-soap-ws-security-server/src/test/java/org/apache/camel/quarkus/component/cxf/soap/wss/server/it/CxfSoapWssServerTest.java b/integration-test-groups/cxf-soap/cxf-soap-ws-security-server/src/test/java/org/apache/camel/quarkus/component/cxf/soap/wss/server/it/CxfSoapWssServerTest.java
new file mode 100644
index 0000000000..6bde9962f5
--- /dev/null
+++ b/integration-test-groups/cxf-soap/cxf-soap-ws-security-server/src/test/java/org/apache/camel/quarkus/component/cxf/soap/wss/server/it/CxfSoapWssServerTest.java
@@ -0,0 +1,129 @@
+/*
+ * 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.quarkus.component.cxf.soap.wss.server.it;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.security.auth.callback.Callback;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.callback.UnsupportedCallbackException;
+
+import io.quarkiverse.cxf.test.QuarkusCxfClientTestUtil;
+import io.quarkus.test.common.QuarkusTestResource;
+import io.quarkus.test.junit.QuarkusTest;
+import io.restassured.RestAssured;
+import org.apache.cxf.endpoint.Client;
+import org.apache.cxf.frontend.ClientProxy;
+import org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor;
+import org.apache.wss4j.common.ConfigurationConstants;
+import org.apache.wss4j.common.ext.WSPasswordCallback;
+import org.assertj.core.api.Assertions;
+import org.eclipse.microprofile.config.Config;
+import org.eclipse.microprofile.config.ConfigProvider;
+import org.hamcrest.Matchers;
+import org.junit.jupiter.api.Test;
+
+import static io.quarkiverse.cxf.test.QuarkusCxfClientTestUtil.anyNs;
+
+@QuarkusTest
+@QuarkusTestResource(CxfWssServerTestResource.class)
+class CxfSoapWssServerTest {
+
+    @Test
+    void wsdl() throws IOException {
+        /* We do not set any static WSDL resource via org.apache.camel.component.cxf.jaxws.CxfEndpoint.setWsdlURL(String)
+         * in org.apache.camel.quarkus.component.cxf.soap.wss.server.it.CxfSoapWssServerRoutes.wssRounderService()
+         * So let's check whether the auto-generated WSDL is served properly */
+        RestAssured.given()
+                .get("/soapservice/rounder?wsdl")
+                .then()
+                .statusCode(200)
+                .body(
+                        Matchers.hasXPath(
+                                anyNs("definitions", "portType")
+                                        + "[@name = 'WssRounderService']"
+                                        + anyNs("operation") + "/@name",
+                                org.hamcrest.CoreMatchers.is("round")));
+    }
+
+    @Test
+    void usernameTokenCorrectPassword() throws IOException {
+
+        final Config config = ConfigProvider.getConfig();
+        final String username = config.getValue("camel-quarkus.wss.server.username", String.class);
+        final String password = config.getValue("camel-quarkus.wss.server.password", String.class);
+
+        final WssRounderService client = rounderClient(username, password);
+
+        Assertions.assertThat(client.round(2.1)).isEqualTo(2);
+
+    }
+
+    @Test
+    void usernameTokenBadPassword() throws IOException {
+
+        final Config config = ConfigProvider.getConfig();
+        final String username = config.getValue("camel-quarkus.wss.server.username", String.class);
+        final WssRounderService client = rounderClient(username, "fakePassword");
+
+        Assertions.assertThatExceptionOfType(javax.xml.ws.soap.SOAPFaultException.class)
+                .isThrownBy(() -> client.round(2.8))
+                .withMessage(
+                        "A security error was encountered when verifying the message");
+
+    }
+
+    static WssRounderService rounderClient(String username, String password) {
+        final WssRounderService client = QuarkusCxfClientTestUtil.getClient(WssRounderService.class, "/soapservice/rounder");
+
+        final CallbackHandler passwordCallback = new CallbackHandler() {
+            @Override
+            public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException {
+                for (Callback callback : callbacks) {
+                    if (callback instanceof WSPasswordCallback) {
+                        ((WSPasswordCallback) callback).setPassword(password);
+                        break;
+                    }
+                }
+            }
+        };
+
+        final Map<String, Object> props = new HashMap<>();
+        props.put(ConfigurationConstants.ACTION, "UsernameToken");
+        props.put(ConfigurationConstants.PASSWORD_TYPE, "PasswordText");
+        props.put(ConfigurationConstants.USER, username);
+        props.put(ConfigurationConstants.PW_CALLBACK_REF, passwordCallback);
+
+        Client clientProxy = ClientProxy.getClient(client);
+        clientProxy.getOutInterceptors().add(new WSS4JOutInterceptor(props));
+        return client;
+    }
+
+    @Test
+    void anonymous() throws IOException {
+        final WssRounderService client = QuarkusCxfClientTestUtil.getClient(WssRounderService.class, "/soapservice/rounder");
+        /* Make sure that it fails properly when called without a password */
+        Assertions.assertThatExceptionOfType(javax.xml.ws.soap.SOAPFaultException.class)
+                .isThrownBy(() -> client.round(2.8))
+                .withMessage(
+                        "A security error was encountered when verifying the message");
+
+    }
+
+}
diff --git a/integration-test-groups/cxf-soap/cxf-soap-ws-security-server/src/test/java/org/apache/camel/quarkus/component/cxf/soap/wss/server/it/CxfWssServerTestResource.java b/integration-test-groups/cxf-soap/cxf-soap-ws-security-server/src/test/java/org/apache/camel/quarkus/component/cxf/soap/wss/server/it/CxfWssServerTestResource.java
new file mode 100644
index 0000000000..50cbc3197b
--- /dev/null
+++ b/integration-test-groups/cxf-soap/cxf-soap-ws-security-server/src/test/java/org/apache/camel/quarkus/component/cxf/soap/wss/server/it/CxfWssServerTestResource.java
@@ -0,0 +1,38 @@
+/*
+ * 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.quarkus.component.cxf.soap.wss.server.it;
+
+import java.util.Map;
+
+import io.quarkus.test.common.QuarkusTestResourceLifecycleManager;
+
+public class CxfWssServerTestResource implements QuarkusTestResourceLifecycleManager {
+
+    @Override
+    public Map<String, String> start() {
+
+        final String user = "cxf-user";
+        final String password = "secret-password";
+        return Map.of(
+                "camel-quarkus.wss.server.username", user,
+                "camel-quarkus.wss.server.password", password);
+    }
+
+    @Override
+    public void stop() {
+    }
+}
diff --git a/integration-test-groups/cxf-soap/pom.xml b/integration-test-groups/cxf-soap/pom.xml
index 86bd49e0e9..c694c4b309 100644
--- a/integration-test-groups/cxf-soap/pom.xml
+++ b/integration-test-groups/cxf-soap/pom.xml
@@ -41,6 +41,7 @@
         <module>cxf-soap-mtom</module>
         <module>cxf-soap-server</module>
         <module>cxf-soap-ws-security-client</module>
+        <module>cxf-soap-ws-security-server</module>
     </modules>
 
 </project>
diff --git a/integration-tests/cxf-soap-grouped/pom.xml b/integration-tests/cxf-soap-grouped/pom.xml
index 9aa35d3b06..633c2e6bb9 100644
--- a/integration-tests/cxf-soap-grouped/pom.xml
+++ b/integration-tests/cxf-soap-grouped/pom.xml
@@ -92,6 +92,16 @@
             <artifactId>quarkus-junit4-mock</artifactId>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>io.quarkiverse.cxf</groupId>
+            <artifactId>quarkus-cxf-test-util</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.assertj</groupId>
+            <artifactId>assertj-core</artifactId>
+            <scope>test</scope>
+        </dependency>
     </dependencies>
 
     <build>
diff --git a/poms/bom-test/pom.xml b/poms/bom-test/pom.xml
index d82638651d..3affd60661 100644
--- a/poms/bom-test/pom.xml
+++ b/poms/bom-test/pom.xml
@@ -61,6 +61,13 @@
                 <type>pom</type>
                 <scope>import</scope>
             </dependency>
+            <dependency>
+                <groupId>io.quarkiverse.cxf</groupId>
+                <artifactId>quarkus-cxf-bom-test</artifactId>
+                <version>${quarkiverse-cxf.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
 
             <dependency>
                 <groupId>org.apache.camel.quarkus</groupId>


[camel-quarkus] 01/04: camel-quarkus-cxf-soap should depend on quarkus-cxf-rt-features-logging

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

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

commit cc373de5b42e16d61c69bc7255bdb9bab06d8aab
Author: Peter Palaga <pp...@redhat.com>
AuthorDate: Fri Oct 21 21:08:56 2022 +0200

    camel-quarkus-cxf-soap should depend on quarkus-cxf-rt-features-logging
    
    ... because camel-cxf-soap depends on cxf-rt-features-logging
---
 extensions/cxf-soap/deployment/pom.xml | 4 ++++
 extensions/cxf-soap/runtime/pom.xml    | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/extensions/cxf-soap/deployment/pom.xml b/extensions/cxf-soap/deployment/pom.xml
index dc926d0933..2614ab0dee 100644
--- a/extensions/cxf-soap/deployment/pom.xml
+++ b/extensions/cxf-soap/deployment/pom.xml
@@ -42,6 +42,10 @@
             <groupId>io.quarkiverse.cxf</groupId>
             <artifactId>quarkus-cxf-deployment</artifactId>
         </dependency>
+        <dependency>
+            <groupId>io.quarkiverse.cxf</groupId>
+            <artifactId>quarkus-cxf-rt-features-logging-deployment</artifactId>
+        </dependency>
     </dependencies>
 
     <build>
diff --git a/extensions/cxf-soap/runtime/pom.xml b/extensions/cxf-soap/runtime/pom.xml
index 2fd5f2a88b..8ead095699 100644
--- a/extensions/cxf-soap/runtime/pom.xml
+++ b/extensions/cxf-soap/runtime/pom.xml
@@ -48,6 +48,10 @@
             <groupId>io.quarkiverse.cxf</groupId>
             <artifactId>quarkus-cxf</artifactId>
         </dependency>
+        <dependency>
+            <groupId>io.quarkiverse.cxf</groupId>
+            <artifactId>quarkus-cxf-rt-features-logging</artifactId>
+        </dependency>
     </dependencies>
 
     <build>


[camel-quarkus] 02/04: Rename ws-security test to-ws-security-client test, better separate package names, test names and property names among the individual cxf test modules so that they do not clash when run together

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

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

commit f63845777dbd9c4f811fccd174f4d1ce3a2dded4
Author: Peter Palaga <pp...@redhat.com>
AuthorDate: Fri Oct 21 21:20:01 2022 +0200

    Rename ws-security test to-ws-security-client test, better separate
    package names, test names and property names among the individual cxf
    test modules so that they do not clash when run together
---
 .../it/{CxfSoapResource.java => CxfSoapClientResource.java}  |  4 ++--
 .../it/{CxfSoapRoutes.java => CxfSoapClientRoutes.java}      |  2 +-
 .../component/cxf/soap/client/it/CxfSoapClientTest.java      |  4 ++--
 .../README.adoc                                              |  0
 .../pom.xml                                                  |  6 +++---
 .../cxf/soap/wss/client/it/CxfSoapWssClientResource.java}    |  6 +++---
 .../cxf/soap/wss/client/it/CxfSoapWssClientRoutes.java}      |  8 ++++----
 .../component/cxf/soap/wss/client}/it/PasswordCallback.java  |  6 +++---
 .../src/main/resources/application.properties                |  0
 .../src/main/resources/wsdl/WssCalculatorService.wsdl        |  0
 .../cxf/soap/wss/client/it/CxfSoapWssClientIT.java}          |  4 ++--
 .../cxf/soap/wss/client/it/CxfSoapWssClientTest.java}        | 10 +++++-----
 .../cxf/soap/wss/client/it/CxfWssClientTestResource.java}    | 12 ++++++------
 integration-test-groups/cxf-soap/pom.xml                     |  2 +-
 14 files changed, 32 insertions(+), 32 deletions(-)

diff --git a/integration-test-groups/cxf-soap/cxf-soap-client/src/main/java/org/apache/camel/quarkus/component/cxf/soap/client/it/CxfSoapResource.java b/integration-test-groups/cxf-soap/cxf-soap-client/src/main/java/org/apache/camel/quarkus/component/cxf/soap/client/it/CxfSoapClientResource.java
similarity index 97%
rename from integration-test-groups/cxf-soap/cxf-soap-client/src/main/java/org/apache/camel/quarkus/component/cxf/soap/client/it/CxfSoapResource.java
rename to integration-test-groups/cxf-soap/cxf-soap-client/src/main/java/org/apache/camel/quarkus/component/cxf/soap/client/it/CxfSoapClientResource.java
index 889e9ef3c9..f56f3ee3e1 100644
--- a/integration-test-groups/cxf-soap/cxf-soap-client/src/main/java/org/apache/camel/quarkus/component/cxf/soap/client/it/CxfSoapResource.java
+++ b/integration-test-groups/cxf-soap/cxf-soap-client/src/main/java/org/apache/camel/quarkus/component/cxf/soap/client/it/CxfSoapClientResource.java
@@ -32,9 +32,9 @@ import org.apache.camel.ProducerTemplate;
 import org.jboss.eap.quickstarts.wscalculator.calculator.Operands;
 import org.jboss.eap.quickstarts.wscalculator.calculator.Result;
 
-@Path("/cxf-soap")
+@Path("/cxf-soap/client")
 @ApplicationScoped
-public class CxfSoapResource {
+public class CxfSoapClientResource {
 
     @Inject
     ProducerTemplate producerTemplate;
diff --git a/integration-test-groups/cxf-soap/cxf-soap-client/src/main/java/org/apache/camel/quarkus/component/cxf/soap/client/it/CxfSoapRoutes.java b/integration-test-groups/cxf-soap/cxf-soap-client/src/main/java/org/apache/camel/quarkus/component/cxf/soap/client/it/CxfSoapClientRoutes.java
similarity index 97%
rename from integration-test-groups/cxf-soap/cxf-soap-client/src/main/java/org/apache/camel/quarkus/component/cxf/soap/client/it/CxfSoapRoutes.java
rename to integration-test-groups/cxf-soap/cxf-soap-client/src/main/java/org/apache/camel/quarkus/component/cxf/soap/client/it/CxfSoapClientRoutes.java
index 80c82293dd..b79f75575e 100644
--- a/integration-test-groups/cxf-soap/cxf-soap-client/src/main/java/org/apache/camel/quarkus/component/cxf/soap/client/it/CxfSoapRoutes.java
+++ b/integration-test-groups/cxf-soap/cxf-soap-client/src/main/java/org/apache/camel/quarkus/component/cxf/soap/client/it/CxfSoapClientRoutes.java
@@ -29,7 +29,7 @@ import org.eclipse.microprofile.config.inject.ConfigProperty;
 import org.jboss.eap.quickstarts.wscalculator.calculator.CalculatorService;
 
 @ApplicationScoped
-public class CxfSoapRoutes extends RouteBuilder {
+public class CxfSoapClientRoutes extends RouteBuilder {
 
     @Inject
     @Named("loggingFeatureClient")
diff --git a/integration-test-groups/cxf-soap/cxf-soap-client/src/test/java/org/apache/camel/quarkus/component/cxf/soap/client/it/CxfSoapClientTest.java b/integration-test-groups/cxf-soap/cxf-soap-client/src/test/java/org/apache/camel/quarkus/component/cxf/soap/client/it/CxfSoapClientTest.java
index a1dc64d84a..5f96277b2f 100644
--- a/integration-test-groups/cxf-soap/cxf-soap-client/src/test/java/org/apache/camel/quarkus/component/cxf/soap/client/it/CxfSoapClientTest.java
+++ b/integration-test-groups/cxf-soap/cxf-soap-client/src/test/java/org/apache/camel/quarkus/component/cxf/soap/client/it/CxfSoapClientTest.java
@@ -41,7 +41,7 @@ class CxfSoapClientTest {
         RestAssured.given()
                 .queryParam("a", "9")
                 .queryParam("b", "3")
-                .post("/cxf-soap/simple")
+                .post("/cxf-soap/client/simple")
                 .then()
                 .statusCode(201)
                 .body(equalTo("3"));
@@ -52,7 +52,7 @@ class CxfSoapClientTest {
         RestAssured.given()
                 .queryParam("a", "3")
                 .queryParam("b", "4")
-                .post("/cxf-soap/operandsAdd")
+                .post("/cxf-soap/client/operandsAdd")
                 .then()
                 .statusCode(201)
                 .body(equalTo("7"));
diff --git a/integration-test-groups/cxf-soap/cxf-soap-ws-security/README.adoc b/integration-test-groups/cxf-soap/cxf-soap-ws-security-client/README.adoc
similarity index 100%
rename from integration-test-groups/cxf-soap/cxf-soap-ws-security/README.adoc
rename to integration-test-groups/cxf-soap/cxf-soap-ws-security-client/README.adoc
diff --git a/integration-test-groups/cxf-soap/cxf-soap-ws-security/pom.xml b/integration-test-groups/cxf-soap/cxf-soap-ws-security-client/pom.xml
similarity index 97%
rename from integration-test-groups/cxf-soap/cxf-soap-ws-security/pom.xml
rename to integration-test-groups/cxf-soap/cxf-soap-ws-security-client/pom.xml
index f34bc6f93d..f2b3ed9239 100644
--- a/integration-test-groups/cxf-soap/cxf-soap-ws-security/pom.xml
+++ b/integration-test-groups/cxf-soap/cxf-soap-ws-security-client/pom.xml
@@ -26,9 +26,9 @@
         <relativePath>../../../poms/build-parent-it/pom.xml</relativePath>
     </parent>
 
-    <artifactId>camel-quarkus-integration-test-cxf-soap-ws-security</artifactId>
-    <name>Camel Quarkus :: Integration Tests :: Cxf Soap Ws Security</name>
-    <description>Integration tests for Camel Quarkus CXF extension ws security part</description>
+    <artifactId>camel-quarkus-integration-test-cxf-soap-ws-security-client</artifactId>
+    <name>Camel Quarkus :: Integration Tests :: CXF SOAP WS-Security client</name>
+    <description>Integration tests for Camel Quarkus CXF extension acting as SOAP client accessing an external server having WS-Security enabled</description>
 
     <build>
         <plugins>
diff --git a/integration-test-groups/cxf-soap/cxf-soap-ws-security/src/main/java/org/apache/camel/quarkus/component/cxf/soap/security/it/CxfSoapResource.java b/integration-test-groups/cxf-soap/cxf-soap-ws-security-client/src/main/java/org/apache/camel/quarkus/component/cxf/soap/wss/client/it/CxfSoapWssClientResource.java
similarity index 92%
rename from integration-test-groups/cxf-soap/cxf-soap-ws-security/src/main/java/org/apache/camel/quarkus/component/cxf/soap/security/it/CxfSoapResource.java
rename to integration-test-groups/cxf-soap/cxf-soap-ws-security-client/src/main/java/org/apache/camel/quarkus/component/cxf/soap/wss/client/it/CxfSoapWssClientResource.java
index 486bbf2597..4ed45625c0 100644
--- a/integration-test-groups/cxf-soap/cxf-soap-ws-security/src/main/java/org/apache/camel/quarkus/component/cxf/soap/security/it/CxfSoapResource.java
+++ b/integration-test-groups/cxf-soap/cxf-soap-ws-security-client/src/main/java/org/apache/camel/quarkus/component/cxf/soap/wss/client/it/CxfSoapWssClientResource.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.camel.quarkus.component.cxf.soap.security.it;
+package org.apache.camel.quarkus.component.cxf.soap.wss.client.it;
 
 import java.net.URI;
 
@@ -30,9 +30,9 @@ import javax.ws.rs.core.Response;
 
 import org.apache.camel.ProducerTemplate;
 
-@Path("/cxf-soap")
+@Path("/cxf-soap/wss/client")
 @ApplicationScoped
-public class CxfSoapResource {
+public class CxfSoapWssClientResource {
 
     @Inject
     ProducerTemplate producerTemplate;
diff --git a/integration-test-groups/cxf-soap/cxf-soap-ws-security/src/main/java/org/apache/camel/quarkus/component/cxf/soap/security/it/CxfSoapRoutes.java b/integration-test-groups/cxf-soap/cxf-soap-ws-security-client/src/main/java/org/apache/camel/quarkus/component/cxf/soap/wss/client/it/CxfSoapWssClientRoutes.java
similarity index 92%
rename from integration-test-groups/cxf-soap/cxf-soap-ws-security/src/main/java/org/apache/camel/quarkus/component/cxf/soap/security/it/CxfSoapRoutes.java
rename to integration-test-groups/cxf-soap/cxf-soap-ws-security-client/src/main/java/org/apache/camel/quarkus/component/cxf/soap/wss/client/it/CxfSoapWssClientRoutes.java
index 31212837f9..e0041708f2 100644
--- a/integration-test-groups/cxf-soap/cxf-soap-ws-security/src/main/java/org/apache/camel/quarkus/component/cxf/soap/security/it/CxfSoapRoutes.java
+++ b/integration-test-groups/cxf-soap/cxf-soap-ws-security-client/src/main/java/org/apache/camel/quarkus/component/cxf/soap/wss/client/it/CxfSoapWssClientRoutes.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.camel.quarkus.component.cxf.soap.security.it;
+package org.apache.camel.quarkus.component.cxf.soap.wss.client.it;
 
 import java.util.HashMap;
 import java.util.Map;
@@ -33,9 +33,9 @@ import org.eclipse.microprofile.config.inject.ConfigProperty;
 import org.jboss.eap.quickstarts.wscalculator.wsscalculator.WssCalculatorService;
 
 @ApplicationScoped
-public class CxfSoapRoutes extends RouteBuilder {
+public class CxfSoapWssClientRoutes extends RouteBuilder {
 
-    @ConfigProperty(name = "password-callback.username")
+    @ConfigProperty(name = "camel-quarkus.it.wss.client.username")
     String username;
 
     @Inject
@@ -50,7 +50,7 @@ public class CxfSoapRoutes extends RouteBuilder {
     @Named("wssInterceptor")
     WSS4JOutInterceptor wssInterceptor;
 
-    @ConfigProperty(name = "camel-quarkus.it.calculator.baseUri")
+    @ConfigProperty(name = "camel-quarkus.it.wss.client.baseUri")
     String serviceBaseUri;
 
     @Override
diff --git a/integration-test-groups/cxf-soap/cxf-soap-ws-security/src/main/java/org/apache/camel/quarkus/component/cxf/soap/security/it/PasswordCallback.java b/integration-test-groups/cxf-soap/cxf-soap-ws-security-client/src/main/java/org/apache/camel/quarkus/component/cxf/soap/wss/client/it/PasswordCallback.java
similarity index 92%
rename from integration-test-groups/cxf-soap/cxf-soap-ws-security/src/main/java/org/apache/camel/quarkus/component/cxf/soap/security/it/PasswordCallback.java
rename to integration-test-groups/cxf-soap/cxf-soap-ws-security-client/src/main/java/org/apache/camel/quarkus/component/cxf/soap/wss/client/it/PasswordCallback.java
index b80c027b0c..abb1c1e190 100644
--- a/integration-test-groups/cxf-soap/cxf-soap-ws-security/src/main/java/org/apache/camel/quarkus/component/cxf/soap/security/it/PasswordCallback.java
+++ b/integration-test-groups/cxf-soap/cxf-soap-ws-security-client/src/main/java/org/apache/camel/quarkus/component/cxf/soap/wss/client/it/PasswordCallback.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.camel.quarkus.component.cxf.soap.security.it;
+package org.apache.camel.quarkus.component.cxf.soap.wss.client.it;
 
 import java.io.IOException;
 
@@ -32,9 +32,9 @@ import org.eclipse.microprofile.config.inject.ConfigProperty;
 @ApplicationScoped
 @Named("passwordCallback")
 public class PasswordCallback implements CallbackHandler {
-    @ConfigProperty(name = "password-callback.username")
+    @ConfigProperty(name = "camel-quarkus.it.wss.client.username")
     String username;
-    @ConfigProperty(name = "password-callback.password")
+    @ConfigProperty(name = "camel-quarkus.it.wss.client.password")
     String password;
 
     /**
diff --git a/integration-test-groups/cxf-soap/cxf-soap-ws-security/src/main/resources/application.properties b/integration-test-groups/cxf-soap/cxf-soap-ws-security-client/src/main/resources/application.properties
similarity index 100%
rename from integration-test-groups/cxf-soap/cxf-soap-ws-security/src/main/resources/application.properties
rename to integration-test-groups/cxf-soap/cxf-soap-ws-security-client/src/main/resources/application.properties
diff --git a/integration-test-groups/cxf-soap/cxf-soap-ws-security/src/main/resources/wsdl/WssCalculatorService.wsdl b/integration-test-groups/cxf-soap/cxf-soap-ws-security-client/src/main/resources/wsdl/WssCalculatorService.wsdl
similarity index 100%
rename from integration-test-groups/cxf-soap/cxf-soap-ws-security/src/main/resources/wsdl/WssCalculatorService.wsdl
rename to integration-test-groups/cxf-soap/cxf-soap-ws-security-client/src/main/resources/wsdl/WssCalculatorService.wsdl
diff --git a/integration-test-groups/cxf-soap/cxf-soap-ws-security/src/test/java/org/apache/camel/quarkus/component/cxf/soap/security/it/CxfSoapClientIT.java b/integration-test-groups/cxf-soap/cxf-soap-ws-security-client/src/test/java/org/apache/camel/quarkus/component/cxf/soap/wss/client/it/CxfSoapWssClientIT.java
similarity index 87%
rename from integration-test-groups/cxf-soap/cxf-soap-ws-security/src/test/java/org/apache/camel/quarkus/component/cxf/soap/security/it/CxfSoapClientIT.java
rename to integration-test-groups/cxf-soap/cxf-soap-ws-security-client/src/test/java/org/apache/camel/quarkus/component/cxf/soap/wss/client/it/CxfSoapWssClientIT.java
index 0c2951dcd2..ca0b2fdf2d 100644
--- a/integration-test-groups/cxf-soap/cxf-soap-ws-security/src/test/java/org/apache/camel/quarkus/component/cxf/soap/security/it/CxfSoapClientIT.java
+++ b/integration-test-groups/cxf-soap/cxf-soap-ws-security-client/src/test/java/org/apache/camel/quarkus/component/cxf/soap/wss/client/it/CxfSoapWssClientIT.java
@@ -14,10 +14,10 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.camel.quarkus.component.cxf.soap.security.it;
+package org.apache.camel.quarkus.component.cxf.soap.wss.client.it;
 
 import io.quarkus.test.junit.QuarkusIntegrationTest;
 
 @QuarkusIntegrationTest
-class CxfSoapClientIT extends CxfSoapClientTest {
+class CxfSoapWssClientIT extends CxfSoapWssClientTest {
 }
diff --git a/integration-test-groups/cxf-soap/cxf-soap-ws-security/src/test/java/org/apache/camel/quarkus/component/cxf/soap/security/it/CxfSoapClientTest.java b/integration-test-groups/cxf-soap/cxf-soap-ws-security-client/src/test/java/org/apache/camel/quarkus/component/cxf/soap/wss/client/it/CxfSoapWssClientTest.java
similarity index 92%
rename from integration-test-groups/cxf-soap/cxf-soap-ws-security/src/test/java/org/apache/camel/quarkus/component/cxf/soap/security/it/CxfSoapClientTest.java
rename to integration-test-groups/cxf-soap/cxf-soap-ws-security-client/src/test/java/org/apache/camel/quarkus/component/cxf/soap/wss/client/it/CxfSoapWssClientTest.java
index 1edbc4abe2..45f1b47938 100644
--- a/integration-test-groups/cxf-soap/cxf-soap-ws-security/src/test/java/org/apache/camel/quarkus/component/cxf/soap/security/it/CxfSoapClientTest.java
+++ b/integration-test-groups/cxf-soap/cxf-soap-ws-security-client/src/test/java/org/apache/camel/quarkus/component/cxf/soap/wss/client/it/CxfSoapWssClientTest.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.camel.quarkus.component.cxf.soap.security.it;
+package org.apache.camel.quarkus.component.cxf.soap.wss.client.it;
 
 import java.io.IOException;
 import java.nio.charset.StandardCharsets;
@@ -32,15 +32,15 @@ import static org.hamcrest.Matchers.equalTo;
 import static org.hamcrest.Matchers.is;
 
 @QuarkusTest
-@QuarkusTestResource(CxfClientTestResource.class)
-class CxfSoapClientTest {
+@QuarkusTestResource(CxfWssClientTestResource.class)
+class CxfSoapWssClientTest {
 
     @Test
     public void wsSecurityClient() {
         RestAssured.given()
                 .queryParam("a", "12")
                 .queryParam("b", "8")
-                .post("/cxf-soap/modulo")
+                .post("/cxf-soap/wss/client/modulo")
                 .then()
                 .statusCode(201)
                 .body(equalTo("4"));
@@ -54,7 +54,7 @@ class CxfSoapClientTest {
     @Test
     void wsdlUpToDate() throws IOException {
         final String wsdlUrl = ConfigProvider.getConfig()
-                .getValue("camel-quarkus.it.calculator.baseUri", String.class);
+                .getValue("camel-quarkus.it.wss.client.baseUri", String.class);
 
         final String staticCopyPath = "target/classes/wsdl/WssCalculatorService.wsdl";
         /* The changing Docker IP address in the WSDL should not matter */
diff --git a/integration-test-groups/cxf-soap/cxf-soap-ws-security/src/test/java/org/apache/camel/quarkus/component/cxf/soap/security/it/CxfClientTestResource.java b/integration-test-groups/cxf-soap/cxf-soap-ws-security-client/src/test/java/org/apache/camel/quarkus/component/cxf/soap/wss/client/it/CxfWssClientTestResource.java
similarity index 86%
rename from integration-test-groups/cxf-soap/cxf-soap-ws-security/src/test/java/org/apache/camel/quarkus/component/cxf/soap/security/it/CxfClientTestResource.java
rename to integration-test-groups/cxf-soap/cxf-soap-ws-security-client/src/test/java/org/apache/camel/quarkus/component/cxf/soap/wss/client/it/CxfWssClientTestResource.java
index 8c5e6158b7..94412b124d 100644
--- a/integration-test-groups/cxf-soap/cxf-soap-ws-security/src/test/java/org/apache/camel/quarkus/component/cxf/soap/security/it/CxfClientTestResource.java
+++ b/integration-test-groups/cxf-soap/cxf-soap-ws-security-client/src/test/java/org/apache/camel/quarkus/component/cxf/soap/wss/client/it/CxfWssClientTestResource.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.camel.quarkus.component.cxf.soap.security.it;
+package org.apache.camel.quarkus.component.cxf.soap.wss.client.it;
 
 import java.util.Map;
 
@@ -26,8 +26,8 @@ import org.testcontainers.containers.GenericContainer;
 import org.testcontainers.containers.output.Slf4jLogConsumer;
 import org.testcontainers.containers.wait.strategy.Wait;
 
-public class CxfClientTestResource implements QuarkusTestResourceLifecycleManager {
-    private static final Logger log = LoggerFactory.getLogger(CxfClientTestResource.class);
+public class CxfWssClientTestResource implements QuarkusTestResourceLifecycleManager {
+    private static final Logger log = LoggerFactory.getLogger(CxfWssClientTestResource.class);
 
     private static final int WILDFLY_PORT = 8080;
     private GenericContainer<?> calculatorContainer;
@@ -50,11 +50,11 @@ public class CxfClientTestResource implements QuarkusTestResourceLifecycleManage
                 calculatorContainer.start();
 
                 return Map.of(
-                        "camel-quarkus.it.calculator.baseUri",
+                        "camel-quarkus.it.wss.client.baseUri",
                         "http://" + calculatorContainer.getHost() + ":" +
                                 calculatorContainer.getMappedPort(WILDFLY_PORT),
-                        "password-callback.username", user,
-                        "password-callback.password", password);
+                        "camel-quarkus.it.wss.client.username", user,
+                        "camel-quarkus.it.wss.client.password", password);
             } catch (Exception e) {
                 throw new RuntimeException(e);
             }
diff --git a/integration-test-groups/cxf-soap/pom.xml b/integration-test-groups/cxf-soap/pom.xml
index 6c35c2f822..dcdd0f90c9 100644
--- a/integration-test-groups/cxf-soap/pom.xml
+++ b/integration-test-groups/cxf-soap/pom.xml
@@ -39,7 +39,7 @@
         <!-- extensions a..z; do not remove this comment, it is important when sorting via  mvn process-resources -Pformat -->
         <module>cxf-soap-client</module>
         <module>cxf-soap-server</module>
-        <module>cxf-soap-ws-security</module>
+        <module>cxf-soap-ws-security-client</module>
     </modules>
 
 </project>