This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-examples.git
commit 48d23d6f203919a3e4369de81e008d3fe93c2fff Author: Andrea Cosentino <[email protected]> AuthorDate: Wed Jan 18 11:58:26 2023 +0100 Move to 4.0.0-SNAPSHOT Signed-off-by: Andrea Cosentino <[email protected]> --- examples/artemis-large-messages/README.adoc | 94 --------- examples/artemis-large-messages/pom.xml | 193 ------------------ .../src/main/resources/META-INF/LICENSE.txt | 203 ------------------- .../src/main/resources/META-INF/NOTICE.txt | 11 -- .../resources/META-INF/spring/camel-context.xml | 68 ------- .../src/main/resources/log4j2.properties | 28 --- .../camel/example/ArtemisLargeMessageTest.java | 90 --------- examples/pom.xml | 3 - examples/servlet-tomcat/README.adoc | 32 --- examples/servlet-tomcat/pom.xml | 160 --------------- .../src/main/resources/META-INF/LICENSE.txt | 203 ------------------- .../src/main/resources/META-INF/NOTICE.txt | 11 -- .../src/main/resources/camel-config.xml | 53 ----- .../src/main/resources/log4j2.properties | 23 --- .../servlet-tomcat/src/main/webapp/WEB-INF/web.xml | 52 ----- examples/servlet-tomcat/src/main/webapp/index.html | 41 ---- .../org/apache/camel/example/ServletTomcatIT.java | 79 -------- .../src/test/resources/arquillian.xml | 13 -- examples/spring-ws/README.adoc | 42 ---- .../camel-example-spring-ws-soapui-project.xml | 75 ------- examples/spring-ws/pom.xml | 220 --------------------- .../camel/example/server/IncrementRoute.java | 49 ----- .../example/server/model/IncrementRequest.java | 38 ---- .../example/server/model/IncrementResponse.java | 38 ---- .../camel/example/server/model/package-info.java | 18 -- .../src/main/resources/META-INF/LICENSE.txt | 203 ------------------- .../src/main/resources/META-INF/NOTICE.txt | 11 -- .../spring-ws/src/main/resources/log4j2.properties | 23 --- .../apache/camel/example/server/model/jaxb.index | 18 -- .../src/main/webapp/WEB-INF/increment.xsd | 36 ---- .../src/main/webapp/WEB-INF/spring-ws-servlet.xml | 64 ------ examples/spring-ws/src/main/webapp/WEB-INF/web.xml | 42 ---- .../apache/camel/example/server/SpringWSIT.java | 104 ---------- .../spring-ws/src/test/resources/arquillian.xml | 10 - 34 files changed, 2348 deletions(-) diff --git a/examples/artemis-large-messages/README.adoc b/examples/artemis-large-messages/README.adoc deleted file mode 100644 index f455f487..00000000 --- a/examples/artemis-large-messages/README.adoc +++ /dev/null @@ -1,94 +0,0 @@ -== Camel Artemis Large Messages - -=== Introduction - -This example shows how to send large messages between Apache Camel and -ActiveMQ Artemis. For large messages we refer to messages with -sizes of GB. - -You should be able to run Camel and Artemis in JVMs with lower memory -such as 256/512mb etc, and still be able to send messages in GB of sizes -between them. - -This works by spooling big messages to disk. Artemis spools large messages -to its `data/large-messages` directory, and Camel uses stream caching -to spool to a temporary directory during routing. - -=== Build - -The example is run using Maven. - -First compile the example by entering: - -[source,sh] ----- -$ mvn compile ----- - -=== Install ActiveMQ Artemis - -To automate downloading, unpacking and configuration of Apache ActiveMQ -Artemis with latest defined version a special profile is added. It's -necessary to run following Maven command for do this during example -install: - -[source,sh] ----- -$ mvn install -P artemis ----- - -=== Run ActiveMQ Artemis - -To start configured ActiveMQ Artemis instance in a shell use: - -[source,sh] ----- -$ target/artemis-instance/bin/artemis run ----- - -Which startup ActiveMQ Artemis in the foreground and keeps it running -until you hit `ctrl+c` to shut down ActiveMQ Artemis. - -=== Run Camel - -Before running this example, then ensure the JVM has limited memory by -executing the following command in a new shell: - -[source,sh] ----- -$ export MAVEN_OPTS="-Xmx256m" ----- - -And then start the Camel application: - -[source,sh] ----- -$ mvn camel:run ----- - -You can then copy files to `target/inbox` folder which is sent to -Artemis, and then back again to Camel and written to the -`target/outbox` folder. - -This should work for small and big files such as files with sizes of GB. -The JVM should not run out of memory. - -To stop the example hit `ctrl+c`. If you restart it and resume entering -numbers you should see that it remembered previously entered values, as -it uses a persistent store. - -=== ActiveMQ Artemis web console - -You can browse the Artemis web console: http://localhost:8161/console to -see activity such as number of consumers and producers. You can also -delete all messages from queues which is a handy operation. - -=== Help and contributions - -If you hit any problem using Camel or have some feedback, then please -https://camel.apache.org/community/support/[let us know]. - -We also love contributors, so -https://camel.apache.org/community/contributing/[get involved] :-) - -The Camel riders! diff --git a/examples/artemis-large-messages/pom.xml b/examples/artemis-large-messages/pom.xml deleted file mode 100644 index 619b059f..00000000 --- a/examples/artemis-large-messages/pom.xml +++ /dev/null @@ -1,193 +0,0 @@ -<?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/maven-v4_0_0.xsd"> - - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.camel.example</groupId> - <artifactId>examples</artifactId> - <version>4.0.0-SNAPSHOT</version> - </parent> - - <artifactId>camel-example-artemis-large-messages</artifactId> - <packaging>jar</packaging> - <name>Camel :: Example :: ActiveMQ Artemis :: Large messages</name> - <description>Demonstrates sending large messages (handles GBs in size) between Apache Camel and ActiveMQ Artemis in - streaming mode - </description> - - <properties> - <category>Messaging</category> - </properties> - - <dependencyManagement> - <dependencies> - <!-- Add Camel BOM --> - <dependency> - <groupId>org.apache.camel</groupId> - <artifactId>camel-bom</artifactId> - <version>${camel.version}</version> - <type>pom</type> - <scope>import</scope> - </dependency> - </dependencies> - </dependencyManagement> - - <dependencies> - - <!-- camel --> - <dependency> - <groupId>org.apache.camel</groupId> - <artifactId>camel-core</artifactId> - </dependency> - <dependency> - <groupId>org.apache.camel</groupId> - <artifactId>camel-jms</artifactId> - </dependency> - <dependency> - <groupId>org.apache.camel</groupId> - <artifactId>camel-spring-main</artifactId> - </dependency> - <dependency> - <groupId>org.apache.camel</groupId> - <artifactId>camel-spring-xml</artifactId> - </dependency> - - <!-- activemq artemis --> - <dependency> - <groupId>org.apache.activemq</groupId> - <artifactId>artemis-spring-integration</artifactId> - <version>${activemq-artemis-version}</version> - </dependency> - <dependency> - <groupId>org.apache.geronimo.specs</groupId> - <artifactId>geronimo-jms_2.0_spec</artifactId> - <version>${geronimo-jms2-spec-version}</version> - </dependency> - <!-- pooled connection --> - <dependency> - <groupId>org.messaginghub</groupId> - <artifactId>pooled-jms</artifactId> - <version>2.0.4</version> - </dependency> - - <!-- logging --> - <dependency> - <groupId>org.apache.logging.log4j</groupId> - <artifactId>log4j-api</artifactId> - <version>${log4j2-version}</version> - </dependency> - <dependency> - <groupId>org.apache.logging.log4j</groupId> - <artifactId>log4j-core</artifactId> - <version>${log4j2-version}</version> - </dependency> - <dependency> - <groupId>org.apache.logging.log4j</groupId> - <artifactId>log4j-slf4j-impl</artifactId> - <version>${log4j2-version}</version> - </dependency> - - <!-- for testing --> - <dependency> - <groupId>org.apache.camel</groupId> - <artifactId>camel-test-spring-junit5</artifactId> - <scope>test</scope> - </dependency> - </dependencies> - - - <build> - <plugins> - <!-- Allows the routes to be run via 'mvn camel:run' --> - <plugin> - <groupId>org.apache.camel</groupId> - <artifactId>camel-maven-plugin</artifactId> - <version>${camel.version}</version> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <configuration> - <!-- Reduce intentionally the max heap size to ensure that the file cannot be not loaded into memory --> - <argLine>-Xmx512m</argLine> - </configuration> - </plugin> - </plugins> - </build> - - <profiles> - <profile> - <id>artemis</id> - <properties> - <skipTests>true</skipTests> - </properties> - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-dependency-plugin</artifactId> - <executions> - <execution> - <id>download-artemis-broker</id> - <goals> - <goal>unpack</goal> - </goals> - <configuration> - <artifactItems> - <artifactItem> - <groupId>org.apache.activemq</groupId> - <artifactId>apache-artemis</artifactId> - <version>${activemq-artemis-version}</version> - <classifier>bin</classifier> - <type>zip</type> - <overWrite>false</overWrite> - <outputDirectory>${project.build.directory}/</outputDirectory> - </artifactItem> - </artifactItems> - <overWriteReleases>false</overWriteReleases> - <overWriteSnapshots>true</overWriteSnapshots> - </configuration> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.apache.activemq</groupId> - <artifactId>artemis-maven-plugin</artifactId> - <version>${activemq-artemis-version}</version> - <executions> - <execution> - <id>create</id> - <goals> - <goal>create</goal> - </goals> - <configuration> - <home>${project.build.directory}/apache-artemis-${activemq-artemis-version}</home> - <instance>${project.build.directory}/artemis-instance</instance> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - </build> - </profile> - </profiles> - -</project> diff --git a/examples/artemis-large-messages/src/main/resources/META-INF/LICENSE.txt b/examples/artemis-large-messages/src/main/resources/META-INF/LICENSE.txt deleted file mode 100644 index 6b0b1270..00000000 --- a/examples/artemis-large-messages/src/main/resources/META-INF/LICENSE.txt +++ /dev/null @@ -1,203 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed 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. - diff --git a/examples/artemis-large-messages/src/main/resources/META-INF/NOTICE.txt b/examples/artemis-large-messages/src/main/resources/META-INF/NOTICE.txt deleted file mode 100644 index 2e215bf2..00000000 --- a/examples/artemis-large-messages/src/main/resources/META-INF/NOTICE.txt +++ /dev/null @@ -1,11 +0,0 @@ - ========================================================================= - == NOTICE file corresponding to the section 4 d of == - == the Apache License, Version 2.0, == - == in this case for the Apache Camel distribution. == - ========================================================================= - - This product includes software developed by - The Apache Software Foundation (http://www.apache.org/). - - Please read the different LICENSE files present in the licenses directory of - this distribution. diff --git a/examples/artemis-large-messages/src/main/resources/META-INF/spring/camel-context.xml b/examples/artemis-large-messages/src/main/resources/META-INF/spring/camel-context.xml deleted file mode 100644 index 4665f28a..00000000 --- a/examples/artemis-large-messages/src/main/resources/META-INF/spring/camel-context.xml +++ /dev/null @@ -1,68 +0,0 @@ -<?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. - ---> -<beans xmlns="http://www.springframework.org/schema/beans" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation=" - http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd - http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd"> - - <!-- setup ActiveMQ Artemis connection factory --> - <bean id="artemisConnectionFactory" class="org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory"> - <constructor-arg index="0" value="tcp://localhost:61616"/> - <!-- setup for allowing to compress large messages with Artemis --> - <property name="minLargeMessageSize" value="10240"/> - <property name="compressLargeMessage" value="true"/> - </bean> - - <!-- use pooled connection factory --> - <bean id="pooledCF" class="org.messaginghub.pooled.jms.JmsPoolConnectionFactory"> - <property name="connectionFactory" ref="artemisConnectionFactory"/> - <property name="maxConnections" value="1"/> - <property name="maxSessionsPerConnection" value="10"/> - </bean> - - <bean id="jms" class="org.apache.camel.component.jms.JmsComponent"> - <!-- specify connection factory on JMS component --> - <property name="connectionFactory" ref="pooledCF"/> - <!-- turn on support for using Artemis streaming mode --> - <property name="artemisStreamingEnabled" value="true"/> - </bean> - - <camelContext id="myCamel" xmlns="http://camel.apache.org/schema/spring"> - <streamCaching id="myCacheConfig" spoolEnabled="true" bufferSize="2048" spoolDirectory="target/cachedir" spoolThreshold="8192"/> - <route> - <from uri="file:target/inbox"/> - <log message="Sending file ${file:name} to Artemis"/> - <to uri="jms:queue:data"/> - <log message="Finish sending file to Artemis"/> - </route> - - <!-- turn on stream caching so we can stream big messages from Artemis - to spool disk to avoid reading from memory --> - <route streamCache="true"> - <from uri="jms:queue:data"/> - <log message="Received data from Artemis"/> - <to uri="file:target/outbox"/> - <log message="Finish saving data from Artemis as file"/> - </route> - - </camelContext> - -</beans> diff --git a/examples/artemis-large-messages/src/main/resources/log4j2.properties b/examples/artemis-large-messages/src/main/resources/log4j2.properties deleted file mode 100644 index 56ee6f3d..00000000 --- a/examples/artemis-large-messages/src/main/resources/log4j2.properties +++ /dev/null @@ -1,28 +0,0 @@ -## --------------------------------------------------------------------------- -## 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. -## --------------------------------------------------------------------------- - -appender.out.type = Console -appender.out.name = out -appender.out.layout.type = PatternLayout -appender.out.layout.pattern = [%30.30t] %-30.30c{1} %-5p %m%n -rootLogger.level = INFO -rootLogger.appenderRef.out.ref = out - -# turn on logging on camel-jms to see more activity -# logger.jms.name = org.apache.camel.component.jms -# logger.jms.level = TRACE - diff --git a/examples/artemis-large-messages/src/test/java/org/apache/camel/example/ArtemisLargeMessageTest.java b/examples/artemis-large-messages/src/test/java/org/apache/camel/example/ArtemisLargeMessageTest.java deleted file mode 100644 index 9a1ccfd2..00000000 --- a/examples/artemis-large-messages/src/test/java/org/apache/camel/example/ArtemisLargeMessageTest.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * 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.example; - -import org.apache.activemq.artemis.core.config.Configuration; -import org.apache.activemq.artemis.core.config.impl.ConfigurationImpl; -import org.apache.activemq.artemis.core.server.ActiveMQServer; -import org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl; -import org.apache.camel.builder.NotifyBuilder; -import org.apache.camel.model.ModelCamelContext; -import org.apache.camel.test.spring.junit5.CamelSpringTest; -import org.junit.jupiter.api.AfterAll; -import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.api.Test; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.test.context.ContextConfiguration; - -import java.io.File; -import java.io.RandomAccessFile; -import java.util.UUID; -import java.util.concurrent.TimeUnit; - -import static org.junit.jupiter.api.Assertions.assertTrue; - -/** - * A unit test allowing to ensure that Camel and Artemis can both support large files that cannot fit - * into the memory. - */ -@CamelSpringTest -@ContextConfiguration("/META-INF/spring/camel-context.xml") -class ArtemisLargeMessageTest { - - @Autowired - ModelCamelContext context; - - private static ActiveMQServer SERVER; - - @BeforeAll - static void init() throws Exception { - Configuration config = new ConfigurationImpl(); - config.addAcceptorConfiguration("tcp", "tcp://localhost:61616"); - config.setJournalDirectory("target/artemis-data/journal"); - config.setBindingsDirectory("target/artemis-data/bindings"); - config.setLargeMessagesDirectory("target/artemis-data/largemessages"); - config.setSecurityEnabled(false); - SERVER = new ActiveMQServerImpl(config); - SERVER.start(); - } - - @AfterAll - static void destroy() throws Exception { - if (SERVER != null) { - SERVER.stop(); - } - } - - @Test - void should_support_large_files() throws Exception { - String fileName = UUID.randomUUID().toString(); - // Generate a big file of 1 Go - try (RandomAccessFile f = new RandomAccessFile(String.format("target/inbox/%s", fileName), "rw")) { - f.setLength(1024 * 1024 * 1024); - } - - NotifyBuilder notify = new NotifyBuilder(context).from("jms:queue:data").whenCompleted(1).create(); - - assertTrue( - notify.matches(40, TimeUnit.SECONDS), "The big file should be processed with success" - ); - - assertTrue( - new File(String.format("target/outbox/%s", fileName)).exists(), - "The big file should be available in the target/outbox directory" - ); - } -} diff --git a/examples/pom.xml b/examples/pom.xml index 746236b1..cfb58654 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -82,7 +82,6 @@ <module>aggregate</module> <module>aggregate-dist</module> <module>any23</module> - <module>artemis-large-messages</module> <module>as2</module> <module>aws</module> <module>azure</module> @@ -138,12 +137,10 @@ <module>routetemplate-xml</module> <module>routes-configuration</module> <module>salesforce-consumer</module> - <module>servlet-tomcat</module> <module>splunk</module> <module>spring</module> <module>spring-pulsar</module> <module>spring-security</module> - <module>spring-ws</module> <module>spring-xquery</module> <module>telegram</module> <module>transformer-demo</module> diff --git a/examples/servlet-tomcat/README.adoc b/examples/servlet-tomcat/README.adoc deleted file mode 100644 index 56903423..00000000 --- a/examples/servlet-tomcat/README.adoc +++ /dev/null @@ -1,32 +0,0 @@ -== Camel Servlet and Apache Tomcat example - -=== Introduction - -An example which shows how to use the Camel Servlet with Apache Tomcat. - -=== Build - -You will need to package this example first: - ----- -$ mvn package ----- - -=== Run - -To run the example deploy it in Apache Tomcat by copying the `+.war+` to -the `webapps` folder of Apache Tomcat. - -And then hit http://localhost:8080/camel-example-servlet-tomcat from a web browser which provides further instructions - -The servlet is located at http://localhost:8080/camel-example-servlet-tomcat/camel/hello - -=== Help and contributions - -If you hit any problem using Camel or have some feedback, then please -https://camel.apache.org/community/support/[let us know]. - -We also love contributors, so -https://camel.apache.org/community/contributing/[get involved] :-) - -The Camel riders! diff --git a/examples/servlet-tomcat/pom.xml b/examples/servlet-tomcat/pom.xml deleted file mode 100644 index c973f7d3..00000000 --- a/examples/servlet-tomcat/pom.xml +++ /dev/null @@ -1,160 +0,0 @@ -<?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/maven-v4_0_0.xsd"> - - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.apache.camel.example</groupId> - <artifactId>examples</artifactId> - <version>4.0.0-SNAPSHOT</version> - </parent> - - <artifactId>camel-example-servlet-tomcat</artifactId> - <name>Camel :: Example :: Servlet :: Tomcat</name> - <description>An example using Camel Servlet with Apache Tomcat</description> - <packaging>war</packaging> - - <properties> - <category>Beginner</category> - <title>Servlet Tomcat</title> - </properties> - - <dependencyManagement> - <dependencies> - <!-- Add Camel BOM --> - <dependency> - <groupId>org.apache.camel</groupId> - <artifactId>camel-bom</artifactId> - <version>${camel.version}</version> - <type>pom</type> - <scope>import</scope> - </dependency> - </dependencies> - </dependencyManagement> - - <dependencies> - - <!-- camel --> - <dependency> - <groupId>org.apache.camel</groupId> - <artifactId>camel-core</artifactId> - </dependency> - <dependency> - <groupId>org.apache.camel</groupId> - <artifactId>camel-spring-xml</artifactId> - </dependency> - <dependency> - <groupId>org.apache.camel</groupId> - <artifactId>camel-servlet</artifactId> - </dependency> - - <!-- we need spring web --> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-web</artifactId> - <version>${spring-version}</version> - </dependency> - - <!-- logging --> - <dependency> - <groupId>org.apache.logging.log4j</groupId> - <artifactId>log4j-api</artifactId> - <version>${log4j2-version}</version> - <scope>runtime</scope> - </dependency> - <dependency> - <groupId>org.apache.logging.log4j</groupId> - <artifactId>log4j-core</artifactId> - <version>${log4j2-version}</version> - <scope>runtime</scope> - </dependency> - <dependency> - <groupId>org.apache.logging.log4j</groupId> - <artifactId>log4j-slf4j-impl</artifactId> - <version>${log4j2-version}</version> - <scope>runtime</scope> - </dependency> - <!-- Test dependencies BEGIN --> - <dependency> - <groupId>org.jboss.arquillian.container</groupId> - <artifactId>arquillian-tomcat-embedded-9</artifactId> - <version>${arquillian-tomcat-version}</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.apache.tomcat.embed</groupId> - <artifactId>tomcat-embed-jasper</artifactId> - <version>${tomcat-version}</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.junit.jupiter</groupId> - <artifactId>junit-jupiter</artifactId> - <version>${junit-jupiter-version}</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.jboss.arquillian.junit5</groupId> - <artifactId>arquillian-junit5-container</artifactId> - <version>${arquillian-version}</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>io.rest-assured</groupId> - <artifactId>rest-assured</artifactId> - <version>${rest-assured-version}</version> - <scope>test</scope> - </dependency> - <!-- Test dependencies END --> - </dependencies> - - <build> - - <finalName>${project.artifactId}</finalName> - - <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> - <!-- allows running this example with mvn jetty:run --> - <plugin> - <groupId>org.eclipse.jetty</groupId> - <artifactId>jetty-maven-plugin</artifactId> - <version>${jetty9-version}</version> - <configuration> - <webApp> - <contextPath>/${project.artifactId}</contextPath> - </webApp> - </configuration> - </plugin> - </plugins> - </build> - -</project> diff --git a/examples/servlet-tomcat/src/main/resources/META-INF/LICENSE.txt b/examples/servlet-tomcat/src/main/resources/META-INF/LICENSE.txt deleted file mode 100644 index 6b0b1270..00000000 --- a/examples/servlet-tomcat/src/main/resources/META-INF/LICENSE.txt +++ /dev/null @@ -1,203 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed 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. - diff --git a/examples/servlet-tomcat/src/main/resources/META-INF/NOTICE.txt b/examples/servlet-tomcat/src/main/resources/META-INF/NOTICE.txt deleted file mode 100644 index 2e215bf2..00000000 --- a/examples/servlet-tomcat/src/main/resources/META-INF/NOTICE.txt +++ /dev/null @@ -1,11 +0,0 @@ - ========================================================================= - == NOTICE file corresponding to the section 4 d of == - == the Apache License, Version 2.0, == - == in this case for the Apache Camel distribution. == - ========================================================================= - - This product includes software developed by - The Apache Software Foundation (http://www.apache.org/). - - Please read the different LICENSE files present in the licenses directory of - this distribution. diff --git a/examples/servlet-tomcat/src/main/resources/camel-config.xml b/examples/servlet-tomcat/src/main/resources/camel-config.xml deleted file mode 100644 index 434df8f2..00000000 --- a/examples/servlet-tomcat/src/main/resources/camel-config.xml +++ /dev/null @@ -1,53 +0,0 @@ -<?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. - ---> -<!-- START SNIPPET: e1 --> -<beans xmlns="http://www.springframework.org/schema/beans" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation=" - http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd - http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd"> - - <camelContext xmlns="http://camel.apache.org/schema/spring"> - - <route id="helloRoute"> - <!-- incoming requests from the servlet is routed --> - <from uri="servlet:hello"/> - <choice> - <when> - <!-- is there a header with the key name? --> - <header>name</header> - <!-- yes so return back a message to the user --> - <transform> - <simple>Hi I am ${sysenv.HOSTNAME}. Hello ${header.name} how are you today?</simple> - </transform> - </when> - <otherwise> - <!-- if no name parameter then output a syntax to the user --> - <transform> - <constant>Add a name parameter to uri, eg ?name=foo</constant> - </transform> - </otherwise> - </choice> - </route> - - </camelContext> - -</beans> - <!-- END SNIPPET: e1 --> \ No newline at end of file diff --git a/examples/servlet-tomcat/src/main/resources/log4j2.properties b/examples/servlet-tomcat/src/main/resources/log4j2.properties deleted file mode 100644 index 9deb51c4..00000000 --- a/examples/servlet-tomcat/src/main/resources/log4j2.properties +++ /dev/null @@ -1,23 +0,0 @@ -## --------------------------------------------------------------------------- -## 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. -## --------------------------------------------------------------------------- - -appender.console.type = Console -appender.console.name = console -appender.console.layout.type = PatternLayout -appender.console.layout.pattern = %d [%-15.15t] %-5p %-30.30c{1} - %m%n -rootLogger.level = INFO -rootLogger.appenderRef.console.ref = console diff --git a/examples/servlet-tomcat/src/main/webapp/WEB-INF/web.xml b/examples/servlet-tomcat/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 1b6fc9f6..00000000 --- a/examples/servlet-tomcat/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,52 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!-- - - 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. - ---> -<!-- START SNIPPET: e1 --> -<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> - - <display-name>My Web Application</display-name> - - <!-- location of spring xml files --> - <context-param> - <param-name>contextConfigLocation</param-name> - <param-value>classpath:camel-config.xml</param-value> - </context-param> - - <!-- the listener that kick-starts Spring --> - <listener> - <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> - </listener> - - <!-- Camel servlet --> - <servlet> - <servlet-name>CamelServlet</servlet-name> - <servlet-class>org.apache.camel.component.servlet.CamelHttpTransportServlet</servlet-class> - <load-on-startup>1</load-on-startup> - </servlet> - - <!-- Camel servlet mapping --> - <servlet-mapping> - <servlet-name>CamelServlet</servlet-name> - <url-pattern>/camel/*</url-pattern> - </servlet-mapping> - -</web-app> - <!-- END SNIPPET: e1 --> diff --git a/examples/servlet-tomcat/src/main/webapp/index.html b/examples/servlet-tomcat/src/main/webapp/index.html deleted file mode 100644 index bbe1c24d..00000000 --- a/examples/servlet-tomcat/src/main/webapp/index.html +++ /dev/null @@ -1,41 +0,0 @@ -<!-- - - 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. - ---> -<html> - -<body> -<h2>Camel Servlet and Apache Tomcat example</h2> - -This example shows how to use route messages in Apache Tomcat using servlets with Apache Camel. -<br/> -<br/> -To get started click <a href="camel/hello">this link</a>. -<br/> -<br/> -If you hit any problems please let us know on the -<a href="http://camel.apache.org/discussion-forums.html">Camel Forums</a> -<br/> -<br/> -Please help us make Apache Camel better - we appreciate any feedback you may -have. Enjoy! -<br/> -<br/> -The Camel riders! -</body> - -</html> \ No newline at end of file diff --git a/examples/servlet-tomcat/src/test/java/org/apache/camel/example/ServletTomcatIT.java b/examples/servlet-tomcat/src/test/java/org/apache/camel/example/ServletTomcatIT.java deleted file mode 100644 index c6f9094b..00000000 --- a/examples/servlet-tomcat/src/test/java/org/apache/camel/example/ServletTomcatIT.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * 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.example; - -import org.jboss.arquillian.container.test.api.Deployment; -import org.jboss.arquillian.container.test.api.RunAsClient; -import org.jboss.arquillian.junit5.ArquillianExtension; -import org.jboss.arquillian.test.api.ArquillianResource; -import org.jboss.shrinkwrap.api.ShrinkWrap; -import org.jboss.shrinkwrap.api.spec.WebArchive; -import org.jboss.shrinkwrap.resolver.api.maven.Maven; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; - -import java.io.File; -import java.net.URL; - -import static io.restassured.RestAssured.given; -import static org.hamcrest.Matchers.containsString; - -/** - * A basic integration test checking that Camel Servlet can be used with Apache Tomcat. - */ -@ExtendWith(ArquillianExtension.class) -public class ServletTomcatIT { - - @Deployment - public static WebArchive createDeployment() { - // build the .war with all the resources and libraries - return ShrinkWrap.create(WebArchive.class, "camel-example-servlet-tomcat.war") - .setWebXML(new File("./src/main/webapp/WEB-INF/web.xml")) - .addAsResource("log4j2.properties") - .addAsResource("camel-config.xml") - .addAsLibraries( - Maven.resolver().loadPomFromFile("pom.xml").importRuntimeDependencies().resolve() - .withTransitivity().asFile() - ); - } - - @ArquillianResource - URL url; - - @Test - @RunAsClient - void should_answer_without_the_name_parameter() { - given() - .baseUri(url.toString()) - .when() - .get("/camel/hello") - .then() - .body(containsString("Add a name parameter to uri")); - } - - @Test - @RunAsClient - void should_answer_with_the_name_parameter() { - given() - .baseUri(url.toString()) - .when() - .queryParam("name", "foo") - .get("/camel/hello") - .then() - .body(containsString("Hello foo how are you today?")); - } -} diff --git a/examples/servlet-tomcat/src/test/resources/arquillian.xml b/examples/servlet-tomcat/src/test/resources/arquillian.xml deleted file mode 100644 index d764c79a..00000000 --- a/examples/servlet-tomcat/src/test/resources/arquillian.xml +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<arquillian xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://jboss.org/schema/arquillian" - xsi:schemaLocation="http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd"> - - <container qualifier="tomcat" default="true"> - <configuration> - <property name="tomcatHome">target/tomcat-embedded-9</property> - <property name="workDir">work</property> - <property name="bindHttpPort">8888</property> - <property name="unpackArchive">true</property> - </configuration> - </container> -</arquillian> \ No newline at end of file diff --git a/examples/spring-ws/README.adoc b/examples/spring-ws/README.adoc deleted file mode 100644 index cba8fe1a..00000000 --- a/examples/spring-ws/README.adoc +++ /dev/null @@ -1,42 +0,0 @@ -== Camel Spring Web Services Example - -=== Introduction - -This example shows how to expose a SOAP-based web service using Camel -and Spring Web Services. - -=== Build - -You will need to compile this example first: - ----- -$ mvn clean package ----- - -=== Run - -To run the example, you need to start up the server by typing - ----- -$ mvn jetty:run ----- - -To stop the server hit ctrl+c - -The web service endpoint address is http://localhost:8080/increment - -The WSDL is available at http://localhost:8080/increment/increment.wsdl - -You can test the web service using for example SOAP-UI. This excellent -tool is freely available from http://www.soapui.org. There’s a ready to -use SOAP-UI project available in the `+client+` directory. - -=== Help and contributions - -If you hit any problem using Camel or have some feedback, then please -https://camel.apache.org/community/support/[let us know]. - -We also love contributors, so -https://camel.apache.org/community/contributing/[get involved] :-) - -The Camel riders! diff --git a/examples/spring-ws/client/camel-example-spring-ws-soapui-project.xml b/examples/spring-ws/client/camel-example-spring-ws-soapui-project.xml deleted file mode 100644 index bc4c0a72..00000000 --- a/examples/spring-ws/client/camel-example-spring-ws-soapui-project.xml +++ /dev/null @@ -1,75 +0,0 @@ -<?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. - ---> -<con:soapui-project name="camel-example-spring-ws" soapui-version="3.6.1" abortOnError="false" runType="SEQUENTIAL" xmlns:con="http://eviware.com/soapui/config"><con:settings/><con:interface xsi:type="con:WsdlInterface" wsaVersion="NONE" name="incrementSoap11" type="wsdl" bindingName="{http://camel.apache.org/example/increment}incrementSoap11" soapVersion="1_1" anonymous="optional" definition="http://localhost:8080/increment/increment.wsdl" xmlns:xsi="http://www.w3.org/2001/XMLSchema-ins [...] - <wsdl:types> - <schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://camel.apache.org/example/increment" xmlns="http://www.w3.org/2001/XMLSchema"> - <element name="incrementRequest"> - <complexType> - <sequence> - <element name="input" type="integer"/> - </sequence> - </complexType> - </element> - <element name="incrementResponse"> - <complexType> - <sequence> - <element name="result" type="integer"/> - </sequence> - </complexType> - </element> - </schema> - </wsdl:types> - <wsdl:message name="incrementResponse"> - <wsdl:part element="tns:incrementResponse" name="incrementResponse"></wsdl:part> - </wsdl:message> - <wsdl:message name="incrementRequest"> - <wsdl:part element="tns:incrementRequest" name="incrementRequest"></wsdl:part> - </wsdl:message> - <wsdl:portType name="increment"> - <wsdl:operation name="increment"> - <wsdl:input message="tns:incrementRequest" name="incrementRequest"></wsdl:input> - <wsdl:output message="tns:incrementResponse" name="incrementResponse"></wsdl:output> - </wsdl:operation> - </wsdl:portType> - <wsdl:binding name="incrementSoap11" type="tns:increment"> - <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> - <wsdl:operation name="increment"> - <soap:operation soapAction=""/> - <wsdl:input name="incrementRequest"> - <soap:body use="literal"/> - </wsdl:input> - <wsdl:output name="incrementResponse"> - <soap:body use="literal"/> - </wsdl:output> - </wsdl:operation> - </wsdl:binding> - <wsdl:service name="incrementService"> - <wsdl:port binding="tns:incrementSoap11" name="incrementSoap11"> - <soap:address location="http://localhost:8080/increment"/> - </wsdl:port> - </wsdl:service> -</wsdl:definitions>]]></con:content><con:type>http://schemas.xmlsoap.org/wsdl/</con:type></con:part></con:definitionCache><con:endpoints><con:endpoint>http://localhost:8080/increment</con:endpoint></con:endpoints><con:operation isOneWay="false" action="" name="increment" bindingOperationName="increment" type="Request-Response" outputName="incrementResponse" inputName="incrementRequest" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call name [...] - <soapenv:Header/> - <soapenv:Body> - <inc:incrementRequest> - <inc:input>42</inc:input> - </inc:incrementRequest> - </soapenv:Body> -</soapenv:Envelope>]]></con:request><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://camel.apache.org/example/increment/Increment/incrementRequest"/><con:wsrmConfig version="1.2"/></con:call></con:operation></con:interface><con:properties/><con:wssContainer/></con:soapui-project> \ No newline at end of file diff --git a/examples/spring-ws/pom.xml b/examples/spring-ws/pom.xml deleted file mode 100644 index 5fba84d4..00000000 --- a/examples/spring-ws/pom.xml +++ /dev/null @@ -1,220 +0,0 @@ -<?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/maven-v4_0_0.xsd"> - - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.apache.camel.example</groupId> - <artifactId>examples</artifactId> - <version>4.0.0-SNAPSHOT</version> - </parent> - - <artifactId>camel-example-spring-ws</artifactId> - <packaging>war</packaging> - <name>Camel :: Example :: Spring :: Web Services</name> - <description>An example showing how to work with Camel and Spring Web Services</description> - - <properties> - <category>WebService</category> - <title>Spring WebService</title> - </properties> - - <dependencyManagement> - <dependencies> - <!-- Add Camel BOM --> - <dependency> - <groupId>org.apache.camel</groupId> - <artifactId>camel-bom</artifactId> - <version>${camel.version}</version> - <type>pom</type> - <scope>import</scope> - </dependency> - </dependencies> - </dependencyManagement> - - <dependencies> - - <dependency> - <groupId>org.apache.camel</groupId> - <artifactId>camel-spring-ws</artifactId> - </dependency> - <!-- Required to avoid org.apache.camel.NoSuchLanguageException for "simple" --> - <dependency> - <groupId>org.apache.camel</groupId> - <artifactId>camel-core-languages</artifactId> - </dependency> - <dependency> - <groupId>org.apache.camel</groupId> - <artifactId>camel-jaxb</artifactId> - </dependency> - <dependency> - <groupId>org.apache.camel</groupId> - <artifactId>camel-spring-xml</artifactId> - </dependency> - <dependency> - <groupId>wsdl4j</groupId> - <artifactId>wsdl4j</artifactId> - <version>${wsdl4j-version}</version> - </dependency> - <dependency> - <groupId>javax.xml.ws</groupId> - <artifactId>jaxws-api</artifactId> - <version>${jaxws-api-version}</version> - <scope>runtime</scope> - </dependency> - <dependency> - <groupId>com.sun.xml.messaging.saaj</groupId> - <artifactId>saaj-impl</artifactId> - <version>1.3.28</version> - <scope>runtime</scope> - <exclusions> - <exclusion> - <groupId>javax.xml.soap</groupId> - <artifactId>javax.xml.soap-api</artifactId> - </exclusion> - </exclusions> - </dependency> - <!-- logging --> - <dependency> - <groupId>org.apache.logging.log4j</groupId> - <artifactId>log4j-api</artifactId> - <version>${log4j2-version}</version> - <scope>runtime</scope> - </dependency> - <dependency> - <groupId>org.apache.logging.log4j</groupId> - <artifactId>log4j-core</artifactId> - <version>${log4j2-version}</version> - <scope>runtime</scope> - </dependency> - <dependency> - <groupId>org.apache.logging.log4j</groupId> - <artifactId>log4j-slf4j-impl</artifactId> - <version>${log4j2-version}</version> - <scope>runtime</scope> - </dependency> - <dependency> - <groupId>org.apache.logging.log4j</groupId> - <artifactId>log4j-jcl</artifactId> - <version>${log4j2-version}</version> - <scope>runtime</scope> - </dependency> - <dependency> - <groupId>org.apache.logging.log4j</groupId> - <artifactId>log4j-web</artifactId> - <version>${log4j2-version}</version> - <scope>runtime</scope> - </dependency> - - <!-- Test dependencies BEGIN --> - <dependency> - <groupId>org.jboss.arquillian.container</groupId> - <artifactId>arquillian-jetty-embedded-9</artifactId> - <version>${arquillian-jetty-version}</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.jboss.shrinkwrap.resolver</groupId> - <artifactId>shrinkwrap-resolver-impl-maven</artifactId> - <version>${shrinkwrap-resolver-version}</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.eclipse.jetty</groupId> - <artifactId>jetty-webapp</artifactId> - <version>${jetty-version}</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.eclipse.jetty</groupId> - <artifactId>jetty-deploy</artifactId> - <version>${jetty-version}</version> - <scope>test</scope> - </dependency> - <dependency> - <!-- Jetty annotations needed for Servlet 3.1 support --> - <groupId>org.eclipse.jetty</groupId> - <artifactId>jetty-annotations</artifactId> - <version>${jetty-version}</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.junit.jupiter</groupId> - <artifactId>junit-jupiter</artifactId> - <version>${junit-jupiter-version}</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.jboss.arquillian.junit5</groupId> - <artifactId>arquillian-junit5-container</artifactId> - <version>${arquillian-version}</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>io.rest-assured</groupId> - <artifactId>rest-assured</artifactId> - <version>${rest-assured-version}</version> - <scope>test</scope> - </dependency> - <!-- Test dependencies END --> - - </dependencies> - - <build> - <finalName>${project.artifactId}</finalName> - <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> - <!-- Allows the routes to be run via 'mvn camel:run' --> - <plugin> - <groupId>org.apache.camel</groupId> - <artifactId>camel-maven-plugin</artifactId> - <version>${camel.version}</version> - </plugin> - - <!-- so we can run mvn jetty:run --> - <plugin> - <groupId>org.eclipse.jetty</groupId> - <artifactId>jetty-maven-plugin</artifactId> - <version>${jetty-plugin-version}</version> - <configuration> - <connectors> - <connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector"> - <port>8080</port> - <maxIdleTime>60000</maxIdleTime> - </connector> - </connectors> - </configuration> - </plugin> - </plugins> - - </build> -</project> diff --git a/examples/spring-ws/src/main/java/org/apache/camel/example/server/IncrementRoute.java b/examples/spring-ws/src/main/java/org/apache/camel/example/server/IncrementRoute.java deleted file mode 100644 index 3f49e6db..00000000 --- a/examples/spring-ws/src/main/java/org/apache/camel/example/server/IncrementRoute.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * 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.example.server; - -import org.apache.camel.Exchange; -import org.apache.camel.Processor; -import org.apache.camel.builder.RouteBuilder; -import org.apache.camel.converter.jaxb.JaxbDataFormat; -import org.apache.camel.example.server.model.IncrementRequest; -import org.apache.camel.example.server.model.IncrementResponse; - -public class IncrementRoute extends RouteBuilder { - - @Override - public void configure() throws Exception { - JaxbDataFormat jaxb = new JaxbDataFormat(IncrementRequest.class.getPackage().getName()); - - from("spring-ws:rootqname:{http://camel.apache.org/example/increment}incrementRequest?endpointMapping=#bean:endpointMapping") - .unmarshal(jaxb) - .process(new IncrementProcessor()) - .marshal(jaxb); - } - - private static final class IncrementProcessor implements Processor { - @Override - public void process(Exchange exchange) throws Exception { - IncrementRequest request = exchange.getIn().getBody(IncrementRequest.class); - IncrementResponse response = new IncrementResponse(); - int result = request.getInput() + 1; // increment input value - response.setResult(result); - exchange.getIn().setBody(response); - } - } - -} \ No newline at end of file diff --git a/examples/spring-ws/src/main/java/org/apache/camel/example/server/model/IncrementRequest.java b/examples/spring-ws/src/main/java/org/apache/camel/example/server/model/IncrementRequest.java deleted file mode 100644 index 7659a30f..00000000 --- a/examples/spring-ws/src/main/java/org/apache/camel/example/server/model/IncrementRequest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 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.example.server.model; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; - -@XmlRootElement -@XmlAccessorType(XmlAccessType.FIELD) -public class IncrementRequest { - - @XmlElement(required = true) - private int input; - - public int getInput() { - return input; - } - - public void setInput(int input) { - this.input = input; - } -} \ No newline at end of file diff --git a/examples/spring-ws/src/main/java/org/apache/camel/example/server/model/IncrementResponse.java b/examples/spring-ws/src/main/java/org/apache/camel/example/server/model/IncrementResponse.java deleted file mode 100644 index 87b46fcb..00000000 --- a/examples/spring-ws/src/main/java/org/apache/camel/example/server/model/IncrementResponse.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 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.example.server.model; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; - -@XmlRootElement -@XmlAccessorType(XmlAccessType.FIELD) -public class IncrementResponse { - - @XmlElement(required = true) - private int result; - - public void setResult(int result) { - this.result = result; - } - - public int getResult() { - return result; - } -} \ No newline at end of file diff --git a/examples/spring-ws/src/main/java/org/apache/camel/example/server/model/package-info.java b/examples/spring-ws/src/main/java/org/apache/camel/example/server/model/package-info.java deleted file mode 100644 index 56e6a702..00000000 --- a/examples/spring-ws/src/main/java/org/apache/camel/example/server/model/package-info.java +++ /dev/null @@ -1,18 +0,0 @@ -/* - * 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. - */ [email protected](namespace = "http://camel.apache.org/example/increment", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) -package org.apache.camel.example.server.model; \ No newline at end of file diff --git a/examples/spring-ws/src/main/resources/META-INF/LICENSE.txt b/examples/spring-ws/src/main/resources/META-INF/LICENSE.txt deleted file mode 100644 index 6b0b1270..00000000 --- a/examples/spring-ws/src/main/resources/META-INF/LICENSE.txt +++ /dev/null @@ -1,203 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed 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. - diff --git a/examples/spring-ws/src/main/resources/META-INF/NOTICE.txt b/examples/spring-ws/src/main/resources/META-INF/NOTICE.txt deleted file mode 100644 index 2e215bf2..00000000 --- a/examples/spring-ws/src/main/resources/META-INF/NOTICE.txt +++ /dev/null @@ -1,11 +0,0 @@ - ========================================================================= - == NOTICE file corresponding to the section 4 d of == - == the Apache License, Version 2.0, == - == in this case for the Apache Camel distribution. == - ========================================================================= - - This product includes software developed by - The Apache Software Foundation (http://www.apache.org/). - - Please read the different LICENSE files present in the licenses directory of - this distribution. diff --git a/examples/spring-ws/src/main/resources/log4j2.properties b/examples/spring-ws/src/main/resources/log4j2.properties deleted file mode 100644 index f02e7aeb..00000000 --- a/examples/spring-ws/src/main/resources/log4j2.properties +++ /dev/null @@ -1,23 +0,0 @@ -## --------------------------------------------------------------------------- -## 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. -## --------------------------------------------------------------------------- - -appender.stdout.type = Console -appender.stdout.name = stdout -appender.stdout.layout.type = PatternLayout -appender.stdout.layout.pattern = %d [%-15.15t] %-5p %-30.30c{1} - %m%n -rootLogger.level = INFO -rootLogger.appenderRef.stdout.ref = stdout diff --git a/examples/spring-ws/src/main/resources/org/apache/camel/example/server/model/jaxb.index b/examples/spring-ws/src/main/resources/org/apache/camel/example/server/model/jaxb.index deleted file mode 100644 index 9bbc20d2..00000000 --- a/examples/spring-ws/src/main/resources/org/apache/camel/example/server/model/jaxb.index +++ /dev/null @@ -1,18 +0,0 @@ -## ------------------------------------------------------------------------ -## 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. -## ------------------------------------------------------------------------ -IncrementRequest -IncrementResponse \ No newline at end of file diff --git a/examples/spring-ws/src/main/webapp/WEB-INF/increment.xsd b/examples/spring-ws/src/main/webapp/WEB-INF/increment.xsd deleted file mode 100644 index 32b9d064..00000000 --- a/examples/spring-ws/src/main/webapp/WEB-INF/increment.xsd +++ /dev/null @@ -1,36 +0,0 @@ -<?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. - ---> -<schema attributeFormDefault="qualified" elementFormDefault="qualified" - targetNamespace="http://camel.apache.org/example/increment" xmlns="http://www.w3.org/2001/XMLSchema"> - <element name="incrementRequest"> - <complexType> - <sequence> - <element name="input" type="integer" /> - </sequence> - </complexType> - </element> - <element name="incrementResponse"> - <complexType> - <sequence> - <element name="result" type="integer" /> - </sequence> - </complexType> - </element> -</schema> \ No newline at end of file diff --git a/examples/spring-ws/src/main/webapp/WEB-INF/spring-ws-servlet.xml b/examples/spring-ws/src/main/webapp/WEB-INF/spring-ws-servlet.xml deleted file mode 100644 index 8ef91f1c..00000000 --- a/examples/spring-ws/src/main/webapp/WEB-INF/spring-ws-servlet.xml +++ /dev/null @@ -1,64 +0,0 @@ -<?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. - ---> -<beans xmlns="http://www.springframework.org/schema/beans" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:camel="http://camel.apache.org/schema/spring" - xsi:schemaLocation=" - http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd - http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd"> - - <!-- === Route(s) ==== --> - <camel:camelContext id="camelContext"> - <camel:routeBuilder ref="incrementRoute"/> - </camel:camelContext> - - <bean id="incrementRoute" class="org.apache.camel.example.server.IncrementRoute"/> - - <!-- === Endpoint mapping ==== --> - <bean id="endpointMapping" class="org.apache.camel.component.spring.ws.bean.CamelEndpointMapping"> - <property name="interceptors"> - <list> - <ref bean="validatingInterceptor"/> - <ref bean="loggingInterceptor"/> - </list> - </property> - </bean> - - <!-- === Interceptors ==== --> - <bean id="loggingInterceptor" class="org.springframework.ws.server.endpoint.interceptor.PayloadLoggingInterceptor"/> - - <bean id="validatingInterceptor" - class="org.springframework.ws.soap.server.endpoint.interceptor.PayloadValidatingInterceptor"> - <property name="schema" value="/WEB-INF/increment.xsd"/> - <property name="validateRequest" value="true"/> - <property name="validateResponse" value="true"/> - </bean> - - <!-- === WSDL exposure ==== --> - <bean id="increment" class="org.springframework.ws.wsdl.wsdl11.DefaultWsdl11Definition"> - <property name="schema"> - <bean id="xsd" class="org.springframework.xml.xsd.SimpleXsdSchema"> - <property name="xsd" value="/WEB-INF/increment.xsd"/> - </bean> - </property> - <property name="portTypeName" value="increment"/> - <property name="locationUri" value="http://localhost:8080/increment"/> - </bean> -</beans> \ No newline at end of file diff --git a/examples/spring-ws/src/main/webapp/WEB-INF/web.xml b/examples/spring-ws/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 8e75d0fc..00000000 --- a/examples/spring-ws/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,42 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!-- - - 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. - ---> -<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> - - <display-name>My Web Application</display-name> - - <servlet> - <servlet-name>spring-ws</servlet-name> - <servlet-class>org.springframework.ws.transport.http.MessageDispatcherServlet</servlet-class> - <init-param> - <!-- Transform the location attributes in WSDLs --> - <param-name>transformWsdlLocations</param-name> - <param-value>true</param-value> - </init-param> - <load-on-startup>1</load-on-startup> - </servlet> - - <servlet-mapping> - <servlet-name>spring-ws</servlet-name> - <url-pattern>/*</url-pattern> - </servlet-mapping> - -</web-app> diff --git a/examples/spring-ws/src/test/java/org/apache/camel/example/server/SpringWSIT.java b/examples/spring-ws/src/test/java/org/apache/camel/example/server/SpringWSIT.java deleted file mode 100644 index 0301d76b..00000000 --- a/examples/spring-ws/src/test/java/org/apache/camel/example/server/SpringWSIT.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * 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.example.server; - -import io.restassured.RestAssured; -import org.jboss.arquillian.container.test.api.Deployment; -import org.jboss.arquillian.container.test.api.RunAsClient; -import org.jboss.arquillian.junit5.ArquillianExtension; -import org.jboss.arquillian.test.api.ArquillianResource; -import org.jboss.shrinkwrap.api.ShrinkWrap; -import org.jboss.shrinkwrap.api.spec.WebArchive; -import org.jboss.shrinkwrap.resolver.api.maven.Maven; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; - -import java.io.File; -import java.net.URL; - -import static io.restassured.RestAssured.given; -import static io.restassured.config.XmlConfig.xmlConfig; -import static org.hamcrest.Matchers.containsString; -import static org.hamcrest.Matchers.equalTo; -import static org.hamcrest.Matchers.is; - -/** - * A basic integration test checking that Camel can leverage Spring Web Services to expose a Web Service. - */ -@ExtendWith(ArquillianExtension.class) -public class SpringWSIT { - - @Deployment - public static WebArchive createDeployment() { - // build the .war with all the resources and libraries - return ShrinkWrap.create(WebArchive.class, "camel-example-spring-ws.war") - .setWebXML(new File("./src/main/webapp/WEB-INF/web.xml")) - .addAsWebInfResource(new File("./src/main/webapp/WEB-INF/increment.xsd")) - .addAsWebInfResource(new File("./src/main/webapp/WEB-INF/spring-ws-servlet.xml")) - .addAsResource("log4j2.properties") - .addAsResource("org/apache/camel/example/server/model/jaxb.index") - .addAsLibraries( - Maven.resolver().loadPomFromFile("pom.xml").importRuntimeDependencies().resolve() - .withTransitivity().asFile() - ); - } - - @ArquillianResource - URL url; - - @Test - @RunAsClient - void should_call_the_web_service() { - given() - .config( - RestAssured.config().xmlConfig( - xmlConfig().declareNamespace("soapenv", "http://schemas.xmlsoap.org/soap/envelope/") - .declareNamespace("inc", "http://camel.apache.org/example/increment") - ) - ) - .baseUri(url.toString()) - .when() - .body("<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:inc=\"http://camel.apache.org/example/increment\">\n" + - " <soapenv:Header/>\n" + - " <soapenv:Body>\n" + - " <inc:incrementRequest>\n" + - " <inc:input>90</inc:input>\n" + - " </inc:incrementRequest>\n" + - " </soapenv:Body>\n" + - "</soapenv:Envelope>") - .contentType("text/xml") - .post("/increment") - .then() - .statusCode(200) - .body("soapenv:Envelope.soapenv:Body.inc:incrementResponse.inc:result.text()", equalTo("91")); - - } - - @Test - @RunAsClient - void should_access_to_the_wsdl() { - given() - .baseUri(url.toString()) - .when() - .get("/increment/increment.wsdl") - .then() - .statusCode(200) - .contentType(is("text/xml")) - .body(containsString("http://localhost")); - } - -} diff --git a/examples/spring-ws/src/test/resources/arquillian.xml b/examples/spring-ws/src/test/resources/arquillian.xml deleted file mode 100644 index 5002f0d1..00000000 --- a/examples/spring-ws/src/test/resources/arquillian.xml +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<arquillian xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://jboss.org/schema/arquillian" - xsi:schemaLocation="http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd"> - - <container qualifier="jetty" default="true"> - <configuration> - <property name="bindHttpPort">8888</property> - </configuration> - </container> -</arquillian> \ No newline at end of file
