-
Notifications
You must be signed in to change notification settings - Fork 185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Camel Quarkus CXF Extension #3931
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Do not edit directly! | ||
# This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page | ||
cqArtifactId: camel-quarkus-cxf-soap | ||
cqArtifactIdBase: cxf-soap | ||
cqNativeSupported: true | ||
cqStatus: Stable | ||
cqDeprecated: false | ||
cqJvmSince: 2.11.0 | ||
cqNativeSince: 2.11.0 | ||
cqCamelPartName: cxf | ||
cqCamelPartTitle: CXF | ||
cqCamelPartDescription: Expose SOAP WebServices using Apache CXF or connect to external WebServices using CXF WS client. | ||
cqExtensionPageTitle: CXF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
docs/modules/ROOT/pages/reference/extensions/cxf-soap.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// Do not edit directly! | ||
// This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page | ||
= CXF | ||
:linkattrs: | ||
:cq-artifact-id: camel-quarkus-cxf-soap | ||
:cq-native-supported: true | ||
:cq-status: Stable | ||
:cq-status-deprecation: Stable | ||
:cq-description: Expose SOAP WebServices using Apache CXF or connect to external WebServices using CXF WS client. | ||
:cq-deprecated: false | ||
:cq-jvm-since: 2.11.0 | ||
:cq-native-since: 2.11.0 | ||
|
||
[.badges] | ||
[.badge-key]##JVM since##[.badge-supported]##2.11.0## [.badge-key]##Native since##[.badge-supported]##2.11.0## | ||
|
||
Expose SOAP WebServices using Apache CXF or connect to external WebServices using CXF WS client. | ||
|
||
== What's inside | ||
|
||
* xref:{cq-camel-components}::cxf-component.adoc[CXF component], URI syntax: `cxf:beanId:address` | ||
|
||
Please refer to the above link for usage and configuration details. | ||
|
||
== Maven coordinates | ||
|
||
https://code.quarkus.io/?extension-search=camel-quarkus-cxf-soap[Create a new project with this extension on code.quarkus.io, window="_blank"] | ||
|
||
Or add the coordinates to your existing project: | ||
|
||
[source,xml] | ||
---- | ||
<dependency> | ||
<groupId>org.apache.camel.quarkus</groupId> | ||
<artifactId>camel-quarkus-cxf-soap</artifactId> | ||
</dependency> | ||
---- | ||
|
||
Check the xref:user-guide/index.adoc[User guide] for more information about writing Camel Quarkus applications. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<?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-deployment</artifactId> | ||
<name>Camel Quarkus :: CXF :: Deployment</name> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.apache.camel.quarkus</groupId> | ||
<artifactId>camel-quarkus-core-deployment</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.camel.quarkus</groupId> | ||
<artifactId>camel-quarkus-cxf-soap</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.quarkiverse.cxf</groupId> | ||
<artifactId>quarkus-cxf-deployment</artifactId> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<configuration> | ||
<annotationProcessorPaths> | ||
<path> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-extension-processor</artifactId> | ||
<version>${quarkus.version}</version> | ||
</path> | ||
</annotationProcessorPaths> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
</project> |
74 changes: 74 additions & 0 deletions
74
...rc/main/java/org/apache/camel/quarkus/component/cxf/soap/deployment/CxfSoapProcessor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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") | ||
.map(DotName::createSimple) | ||
.flatMap(dotName -> index.getAllKnownSubclasses(dotName).stream()) | ||
.map(classInfo -> classInfo.name().toString()) | ||
.map(className -> new ReflectiveClassBuildItem(false, false, className)) | ||
.forEach(reflectiveClass::produce); | ||
|
||
Stream.of( | ||
"org.apache.cxf.feature.Feature", | ||
"org.apache.cxf.interceptor.Interceptor", | ||
"org.apache.cxf.binding.soap.interceptor.SoapInterceptor", | ||
"org.apache.cxf.phase.PhaseInterceptor") | ||
.map(DotName::createSimple) | ||
.flatMap(dotName -> index.getAllKnownImplementors(dotName).stream()) | ||
.map(classInfo -> classInfo.name().toString()) | ||
.map(className -> new ReflectiveClassBuildItem(false, false, className)) | ||
.forEach(reflectiveClass::produce); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?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-extensions</artifactId> | ||
<version>2.12.0-SNAPSHOT</version> | ||
<relativePath>../pom.xml</relativePath> | ||
</parent> | ||
|
||
<artifactId>camel-quarkus-cxf-soap-parent</artifactId> | ||
<name>Camel Quarkus :: CXF</name> | ||
<packaging>pom</packaging> | ||
|
||
<modules> | ||
<module>deployment</module> | ||
<module>runtime</module> | ||
</modules> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
@@ -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> | ||||||||||
Comment on lines
+36
to
+37
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
A bit too late for 2.11.0 |
||||||||||
</properties> | ||||||||||
|
||||||||||
<dependencies> | ||||||||||
<dependency> | ||||||||||
<groupId>org.apache.camel.quarkus</groupId> | ||||||||||
<artifactId>camel-quarkus-core</artifactId> | ||||||||||
</dependency> | ||||||||||
<dependency> | ||||||||||
<groupId>org.apache.camel</groupId> | ||||||||||
<artifactId>camel-cxf-soap</artifactId> | ||||||||||
</dependency> | ||||||||||
<dependency> | ||||||||||
<groupId>org.apache.camel</groupId> | ||||||||||
<artifactId>camel-cxf-common</artifactId> | ||||||||||
</dependency> | ||||||||||
<dependency> | ||||||||||
<groupId>org.apache.camel</groupId> | ||||||||||
<artifactId>camel-cxf-transport</artifactId> | ||||||||||
</dependency> | ||||||||||
|
||||||||||
<dependency> | ||||||||||
<groupId>io.quarkiverse.cxf</groupId> | ||||||||||
<artifactId>quarkus-cxf</artifactId> | ||||||||||
</dependency> | ||||||||||
|
||||||||||
</dependencies> | ||||||||||
|
||||||||||
<build> | ||||||||||
<plugins> | ||||||||||
<plugin> | ||||||||||
<groupId>io.quarkus</groupId> | ||||||||||
<artifactId>quarkus-extension-maven-plugin</artifactId> | ||||||||||
</plugin> | ||||||||||
<plugin> | ||||||||||
<groupId>org.apache.maven.plugins</groupId> | ||||||||||
<artifactId>maven-compiler-plugin</artifactId> | ||||||||||
<configuration> | ||||||||||
<annotationProcessorPaths> | ||||||||||
<path> | ||||||||||
<groupId>io.quarkus</groupId> | ||||||||||
<artifactId>quarkus-extension-processor</artifactId> | ||||||||||
<version>${quarkus.version}</version> | ||||||||||
</path> | ||||||||||
</annotationProcessorPaths> | ||||||||||
</configuration> | ||||||||||
</plugin> | ||||||||||
</plugins> | ||||||||||
</build> | ||||||||||
|
||||||||||
<profiles> | ||||||||||
<profile> | ||||||||||
<id>full</id> | ||||||||||
<activation> | ||||||||||
<property> | ||||||||||
<name>!quickly</name> | ||||||||||
</property> | ||||||||||
</activation> | ||||||||||
<build> | ||||||||||
<plugins> | ||||||||||
<plugin> | ||||||||||
<groupId>org.apache.camel.quarkus</groupId> | ||||||||||
<artifactId>camel-quarkus-maven-plugin</artifactId> | ||||||||||
<executions> | ||||||||||
<execution> | ||||||||||
<id>update-extension-doc-page</id> | ||||||||||
<goals> | ||||||||||
<goal>update-extension-doc-page</goal> | ||||||||||
</goals> | ||||||||||
<phase>process-classes</phase> | ||||||||||
</execution> | ||||||||||
</executions> | ||||||||||
</plugin> | ||||||||||
</plugins> | ||||||||||
</build> | ||||||||||
</profile> | ||||||||||
</profiles> | ||||||||||
</project> |
1 change: 1 addition & 0 deletions
1
extensions/cxf-soap/runtime/src/main/resources/META-INF/cxf/bus-extensions.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
io.quarkiverse.cxf.transport.VertxDestinationFactory::true |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?