You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2022/08/07 23:08:24 UTC

[GitHub] [camel-quarkus] ppalaga commented on a diff in pull request #3931: Camel Quarkus CXF Extension

ppalaga commented on code in PR #3931:
URL: https://github.com/apache/camel-quarkus/pull/3931#discussion_r938914826


##########
extensions/cxf-soap/runtime/pom.xml:
##########
@@ -0,0 +1,114 @@
+<?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-cxf-soap-parent</artifactId>
+        <version>2.12.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-cxf-soap</artifactId>
+    <name>Camel Quarkus :: CXF :: Runtime</name>
+    <description>Expose SOAP WebServices using Apache CXF or connect to external WebServices using CXF WS client.</description>
+
+    <properties>
+        <camel.quarkus.jvmSince>2.11.0</camel.quarkus.jvmSince>
+        <camel.quarkus.nativeSince>2.11.0</camel.quarkus.nativeSince>

Review Comment:
   ```suggestion
           <camel.quarkus.jvmSince>2.12.0</camel.quarkus.jvmSince>
           <camel.quarkus.nativeSince>2.12.0</camel.quarkus.nativeSince>
   ```
   A bit too late for 2.11.0 



##########
extensions/cxf-soap/deployment/src/main/java/org/apache/camel/quarkus/component/cxf/soap/deployment/CxfSoapProcessor.java:
##########
@@ -0,0 +1,74 @@
+/*
+ * 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.deployment;
+
+import java.util.stream.Stream;
+
+import io.quarkus.deployment.annotations.BuildProducer;
+import io.quarkus.deployment.annotations.BuildStep;
+import io.quarkus.deployment.builditem.CombinedIndexBuildItem;
+import io.quarkus.deployment.builditem.FeatureBuildItem;
+import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
+import io.quarkus.deployment.builditem.nativeimage.RuntimeInitializedClassBuildItem;
+import org.jboss.jandex.DotName;
+import org.jboss.jandex.IndexView;
+
+class CxfSoapProcessor {
+
+    private static final String FEATURE = "camel-cxf-soap";
+
+    @BuildStep
+    FeatureBuildItem feature() {
+        return new FeatureBuildItem(FEATURE);
+    }
+
+    @BuildStep
+    void runtimeInitializedClasses(BuildProducer<RuntimeInitializedClassBuildItem> runtimeInitializedClass) {
+        Stream.of(
+                "org.apache.cxf.attachment.AttachmentUtil")
+                .map(RuntimeInitializedClassBuildItem::new)
+                .forEach(runtimeInitializedClass::produce);
+    }
+
+    @BuildStep
+    void registerForReflection(BuildProducer<ReflectiveClassBuildItem> reflectiveClass, CombinedIndexBuildItem combinedIndex) {
+        IndexView index = combinedIndex.getIndex();
+
+        Stream.of(
+                "org.apache.cxf.feature.AbstractFeature",
+                "org.apache.wss4j.dom.handler.WSHandler",
+                "org.apache.cxf.phase.AbstractPhaseInterceptor",
+                "org.apache.cxf.binding.soap.interceptor.AbstractSOAPInterceptor",
+                "org.apache.cxf.phase.PhaseInterceptor")

Review Comment:
   Aren't these a bit overlapping with what we collect bellow via `getAllKnownImplementors()` ? 
   I mean AbstractFeature implements org.apache.cxf.feature.Feature, 
   AbstractPhaseInterceptor implements org.apache.cxf.phase.PhaseInterceptor, etc.
   so each subclass if the given abstract class will implement the interface and will inevitably be caught by the `getAllKnownImplementors()` query, no?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org