You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ap...@apache.org on 2025/04/15 09:35:37 UTC
(camel-examples) 03/03: Remove AS2 example
This is an automated email from the ASF dual-hosted git repository.
apupier pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-examples.git
commit 218836af4251d9ecb70f18dedb3b2e4511925767
Author: Aurélien Pupier <ap...@redhat.com>
AuthorDate: Mon Apr 14 16:22:27 2025 +0200
Remove AS2 example
Given that this example is failing for at least 9 months, I propose to
remove it. It will allow to enable tests on the GitHub Actions. This
would avoid (a bit) having other examples to be broken without noticing
it.
Signed-off-by: Aurélien Pupier <ap...@redhat.com>
---
README.adoc | 2 -
as2/README.adoc | 37 ----
as2/pom.xml | 114 ------------
.../as2/ExamineAS2ServerEndpointExchange.java | 54 ------
.../example/as2/ProvisionAS2ComponentCrypto.java | 105 -----------
.../as2/ProvisionExchangeMessageCrypto.java | 43 -----
.../java/org/apache/camel/example/as2/Utils.java | 83 ---------
as2/src/main/resources/META-INF/LICENSE.txt | 203 ---------------------
as2/src/main/resources/META-INF/NOTICE.txt | 11 --
.../resources/META-INF/spring/camel-context.xml | 200 --------------------
as2/src/main/resources/log4j.properties | 32 ----
.../java/org/apache/camel/example/as2/As2Test.java | 49 -----
pom.xml | 3 -
13 files changed, 936 deletions(-)
diff --git a/README.adoc b/README.adoc
index 93e6442a..db004fb1 100644
--- a/README.adoc
+++ b/README.adoc
@@ -128,8 +128,6 @@ Number of Examples: 74 (0 deprecated)
| link:loadbalancing/README.adoc[Load Balancing] (loadbalancing) | EIP | An example that demonstrate load balancing messaging with mina servers (TCP/IP)
-| link:as2/README.adoc[AS2 Example] (as2) | File | An example which demonstrates the use of the Camel AS2 component
-
| link:ftp/README.adoc[FTP] (ftp) | File | An example for showing Camel FTP integration
| link:minio/README.adoc[Minio] (minio) | File | An example for showing Camel using MinIO Component
diff --git a/as2/README.adoc b/as2/README.adoc
deleted file mode 100644
index f165995e..00000000
--- a/as2/README.adoc
+++ /dev/null
@@ -1,37 +0,0 @@
-== Camel AS2 Example
-
-=== Introduction
-
-This example shows how to work with AS2 and Camel.
-
-The Camel AS2 example is a demo of the `camel-as2` component to show how
-to route messages between AS2 endpoints, with endpoints consuming and
-producing AS2 messages over HTTP request.
-
-=== Build
-
-You will need to compile this example first:
-
-[source,sh]
-----
-$ mvn compile
-----
-
-=== Run
-
-To run the example type
-
-[source,sh]
-----
-$ mvn camel:run
-----
-
-=== 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/as2/pom.xml b/as2/pom.xml
deleted file mode 100644
index cb2dff76..00000000
--- a/as2/pom.xml
+++ /dev/null
@@ -1,114 +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/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.camel.example</groupId>
- <artifactId>camel-examples</artifactId>
- <version>4.12.0-SNAPSHOT</version>
- </parent>
- <artifactId>camel-example-as2</artifactId>
- <name>Camel :: Example :: AS2</name>
- <description>An example which demonstrates the use of the Camel AS2 component</description>
-
- <properties>
- <category>File</category>
- <title>AS2 Example</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-as2</artifactId>
- <exclusions>
- <exclusion>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-slf4j2-impl</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-core</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>
-
- <!-- logging -->
- <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-slf4j2-impl</artifactId>
- <version>${log4j2-version}</version>
- <scope>runtime</scope>
- </dependency>
- <!-- for testing -->
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-test-spring-junit5</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <build>
- <defaultGoal>install</defaultGoal>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-resources-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-maven-plugin</artifactId>
- <version>${camel.version}</version>
- </plugin>
- </plugins>
- </build>
-
-</project>
diff --git a/as2/src/main/java/org/apache/camel/example/as2/ExamineAS2ServerEndpointExchange.java b/as2/src/main/java/org/apache/camel/example/as2/ExamineAS2ServerEndpointExchange.java
deleted file mode 100644
index d988f20e..00000000
--- a/as2/src/main/java/org/apache/camel/example/as2/ExamineAS2ServerEndpointExchange.java
+++ /dev/null
@@ -1,54 +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.as2;
-
-import org.apache.camel.Exchange;
-import org.apache.camel.Processor;
-import org.apache.camel.component.as2.api.util.AS2Utils;
-import org.apache.camel.component.as2.internal.AS2Constants;
-import org.apache.hc.core5.http.HttpRequest;
-import org.apache.hc.core5.http.protocol.HttpCoreContext;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class ExamineAS2ServerEndpointExchange implements Processor {
-
- private final transient Logger log = LoggerFactory.getLogger(getClass());
-
- @Override
- public void process(Exchange exchange) throws Exception {
-
- HttpCoreContext context = exchange.getProperty(AS2Constants.AS2_INTERCHANGE, HttpCoreContext.class);
- String ediMessage = exchange.getIn().getBody(String.class);
-
- if (context != null) {
- HttpRequest request = context.getRequest();
- log.info("\n*******************************************************************************"
- + "\n*******************************************************************************"
- + "\n\n******************* AS2 Server Endpoint Received Request **********************"
- + "\n\n" + AS2Utils.printMessage(request) + "\n"
- + "\n************************** Containing EDI message *****************************"
- + "\n\n" + ediMessage + "\n"
- + "\n*******************************************************************************"
- + "\n*******************************************************************************");
- } else {
- log.info("AS2 Interchange missing from context");
- }
-
- }
-
-}
diff --git a/as2/src/main/java/org/apache/camel/example/as2/ProvisionAS2ComponentCrypto.java b/as2/src/main/java/org/apache/camel/example/as2/ProvisionAS2ComponentCrypto.java
deleted file mode 100644
index a63bb967..00000000
--- a/as2/src/main/java/org/apache/camel/example/as2/ProvisionAS2ComponentCrypto.java
+++ /dev/null
@@ -1,105 +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.as2;
-
-import java.security.KeyPair;
-import java.security.KeyPairGenerator;
-import java.security.SecureRandom;
-import java.security.Security;
-import java.security.cert.Certificate;
-import java.security.cert.X509Certificate;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.CamelContextAware;
-import org.apache.camel.RuntimeCamelException;
-import org.apache.camel.component.as2.AS2Component;
-import org.apache.camel.component.as2.AS2Configuration;
-import org.apache.camel.component.as2.api.AS2CompressionAlgorithm;
-import org.apache.camel.component.as2.api.AS2EncryptionAlgorithm;
-import org.apache.camel.component.as2.api.AS2SignatureAlgorithm;
-import org.bouncycastle.jce.provider.BouncyCastleProvider;
-
-public class ProvisionAS2ComponentCrypto implements CamelContextAware {
-
- private KeyPair issueKP;
- private X509Certificate issueCert;
-
- private KeyPair signingKP;
- private KeyPair decryptingKP;
-
- private X509Certificate clientCert;
- private List<X509Certificate> certList;
-
-
- @Override
- public void setCamelContext(CamelContext camelContext) {
- try {
- setupKeysAndCertificates();
- } catch (Exception e) {
- throw new RuntimeCamelException("failed to initialized Camel context for AS component", e);
- }
- AS2Component as2Component = camelContext.getComponent("as2", AS2Component.class);
- AS2Configuration configuration = new AS2Configuration();
- configuration.setSigningAlgorithm(AS2SignatureAlgorithm.SHA512WITHRSA);
- configuration.setSigningCertificateChain(certList.toArray(new Certificate[0]));
- configuration.setSigningPrivateKey(signingKP.getPrivate());
- configuration.setSignedReceiptMicAlgorithms("sha1,md5");
- configuration.setEncryptingAlgorithm(AS2EncryptionAlgorithm.AES128_CBC);
- configuration.setEncryptingCertificateChain(certList.toArray(new Certificate[0]));
- configuration.setDecryptingPrivateKey(decryptingKP.getPrivate());
- configuration.setCompressionAlgorithm(AS2CompressionAlgorithm.ZLIB);
- as2Component.setConfiguration(configuration);
- }
-
- @Override
- public CamelContext getCamelContext() {
- return null;
- }
-
- private void setupKeysAndCertificates() throws Exception {
-
- Security.addProvider(new BouncyCastleProvider());
-
- //
- // set up our certificates
- //
- KeyPairGenerator kpg = KeyPairGenerator.getInstance("RSA", "BC");
-
- kpg.initialize(1024, new SecureRandom());
-
- String issueDN = "O=Punkhorn Software, C=US";
- issueKP = kpg.generateKeyPair();
- issueCert = Utils.makeCertificate(issueKP, issueDN, issueKP, issueDN);
-
- //
- // certificate we sign against
- //
- String signingDN = "CN=William J. Collins, E=punkhornsw@gmail.com, O=Punkhorn Software, C=US";
- signingKP = kpg.generateKeyPair();
- clientCert = Utils.makeCertificate(signingKP, signingDN, issueKP, issueDN);
-
- certList = new ArrayList<>();
-
- certList.add(clientCert);
- certList.add(issueCert);
-
- // keys used to encrypt/decrypt
- decryptingKP = signingKP;
- }
-}
diff --git a/as2/src/main/java/org/apache/camel/example/as2/ProvisionExchangeMessageCrypto.java b/as2/src/main/java/org/apache/camel/example/as2/ProvisionExchangeMessageCrypto.java
deleted file mode 100644
index 976fa1b1..00000000
--- a/as2/src/main/java/org/apache/camel/example/as2/ProvisionExchangeMessageCrypto.java
+++ /dev/null
@@ -1,43 +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.as2;
-
-import org.apache.camel.Exchange;
-import org.apache.camel.Processor;
-import org.apache.camel.component.as2.AS2Component;
-import org.apache.camel.component.as2.AS2Configuration;
-
-public class ProvisionExchangeMessageCrypto implements Processor {
-
- @Override
- public void process(Exchange exchange) throws Exception {
-
- AS2Component component = exchange.getContext().getComponent("as2", AS2Component.class);
- AS2Configuration configuration = component.getConfiguration();
-
- exchange.getIn().setHeader("CamelAs2.signingAlgorithm", configuration.getSigningAlgorithm());
- exchange.getIn().setHeader("CamelAs2.signingCertificateChain", configuration.getSigningCertificateChain());
- exchange.getIn().setHeader("CamelAs2.signingPrivateKey", configuration.getSigningPrivateKey());
- exchange.getIn().setHeader("CamelAs2.signedReceiptMicAlgorithms", configuration.getSignedReceiptMicAlgorithms());
- exchange.getIn().setHeader("CamelAs2.encryptingAlgorithm", configuration.getEncryptingAlgorithm());
- exchange.getIn().setHeader("CamelAs2.encryptingCertificateChain", configuration.getEncryptingCertificateChain());
- exchange.getIn().setHeader("CamelAs2.decryptingPrivateKey", configuration.getDecryptingPrivateKey());
- exchange.getIn().setHeader("CamelAs2.compressionAlgorithm", configuration.getCompressionAlgorithm());
-
- }
-
-}
diff --git a/as2/src/main/java/org/apache/camel/example/as2/Utils.java b/as2/src/main/java/org/apache/camel/example/as2/Utils.java
deleted file mode 100644
index f5169449..00000000
--- a/as2/src/main/java/org/apache/camel/example/as2/Utils.java
+++ /dev/null
@@ -1,83 +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.as2;
-
-import java.io.IOException;
-import java.math.BigInteger;
-import java.security.GeneralSecurityException;
-import java.security.KeyPair;
-import java.security.PrivateKey;
-import java.security.PublicKey;
-import java.security.cert.X509Certificate;
-import java.util.Date;
-
-import org.bouncycastle.asn1.x500.X500Name;
-import org.bouncycastle.asn1.x509.AuthorityKeyIdentifier;
-import org.bouncycastle.asn1.x509.Extension;
-import org.bouncycastle.asn1.x509.SubjectKeyIdentifier;
-import org.bouncycastle.asn1.x509.SubjectPublicKeyInfo;
-import org.bouncycastle.cert.X509v3CertificateBuilder;
-import org.bouncycastle.cert.bc.BcX509ExtensionUtils;
-import org.bouncycastle.cert.jcajce.JcaX509CertificateConverter;
-import org.bouncycastle.cert.jcajce.JcaX509v3CertificateBuilder;
-import org.bouncycastle.operator.OperatorCreationException;
-import org.bouncycastle.operator.jcajce.JcaContentSignerBuilder;
-
-public final class Utils {
- //
- // certificate serial number seed.
- //
- static int serialNo = 1;
-
- private Utils() {
- }
-
- public static AuthorityKeyIdentifier createAuthorityKeyId(PublicKey pub) {
- SubjectPublicKeyInfo info = SubjectPublicKeyInfo.getInstance(pub.getEncoded());
-
- BcX509ExtensionUtils utils = new BcX509ExtensionUtils();
- return utils.createAuthorityKeyIdentifier(info);
- }
-
- public static SubjectKeyIdentifier createSubjectKeyId(PublicKey pub) {
- SubjectPublicKeyInfo info = SubjectPublicKeyInfo.getInstance(pub.getEncoded());
-
- return new BcX509ExtensionUtils().createSubjectKeyIdentifier(info);
- }
-
- /**
- * create a basic X509 certificate from the given keys
- */
- public static X509Certificate makeCertificate(KeyPair subKP, String subDN, KeyPair issKP, String issDN)
- throws GeneralSecurityException, IOException, OperatorCreationException {
- PublicKey subPub = subKP.getPublic();
- PrivateKey issPriv = issKP.getPrivate();
- PublicKey issPub = issKP.getPublic();
-
- X509v3CertificateBuilder v3CertGen = new JcaX509v3CertificateBuilder(new X500Name(issDN),
- BigInteger.valueOf(serialNo++), new Date(System.currentTimeMillis()),
- new Date(System.currentTimeMillis() + (1000L * 60 * 60 * 24 * 100)), new X500Name(subDN), subPub);
-
- v3CertGen.addExtension(Extension.subjectKeyIdentifier, false, createSubjectKeyId(subPub));
-
- v3CertGen.addExtension(Extension.authorityKeyIdentifier, false, createAuthorityKeyId(issPub));
-
- return new JcaX509CertificateConverter().setProvider("BC").getCertificate(
- v3CertGen.build(new JcaContentSignerBuilder("MD5withRSA").setProvider("BC").build(issPriv)));
- }
-
-}
diff --git a/as2/src/main/resources/META-INF/LICENSE.txt b/as2/src/main/resources/META-INF/LICENSE.txt
deleted file mode 100644
index 6b0b1270..00000000
--- a/as2/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/as2/src/main/resources/META-INF/NOTICE.txt b/as2/src/main/resources/META-INF/NOTICE.txt
deleted file mode 100644
index 2e215bf2..00000000
--- a/as2/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/as2/src/main/resources/META-INF/spring/camel-context.xml b/as2/src/main/resources/META-INF/spring/camel-context.xml
deleted file mode 100644
index e22ebeec..00000000
--- a/as2/src/main/resources/META-INF/spring/camel-context.xml
+++ /dev/null
@@ -1,200 +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
- ">
-
-
- <!-- START SNIPPET: example -->
- <bean id="examine-as2-server-endpoint-exchange" class="org.apache.camel.example.as2.ExamineAS2ServerEndpointExchange"/>
- <bean id="provision-exchange-message-crypto" class="org.apache.camel.example.as2.ProvisionExchangeMessageCrypto"/>
- <bean id="provision-as2-component-crypto" class="org.apache.camel.example.as2.ProvisionAS2ComponentCrypto"/>
-
- <camelContext id="example_context"
- xmlns="http://camel.apache.org/schema/spring">
- <route id="server-route">
- <from
- uri="as2://server/listen?requestUriPattern=/&serverPortNumber=8888"/>
- <to uri="bean:examine-as2-server-endpoint-exchange"/>
- </route>
- <route id="triger-clients-route">
- <from uri="timer://init?repeatCount=1"/>
- <transform>
- <constant>
-UNB+UNOA:1+005435656:1+006415160:1+060515:14.12.0-SNAPSHOT0000000000778'
-UNH+00000000000117+INVOIC:D:97B:UN'
-BGM+380+342459+9'
-DTM+3:20060515:102'
-RFF+ON:521052'
-NAD+BY+792820524::16++CUMMINS MID-RANGE ENGINE PLANT'
-NAD+SE+005435656::16++GENERAL WIDGET COMPANY'
-CUX+1:USD'
-LIN+1++157870:IN'
-IMD+F++:::WIDGET'
-QTY+47:1020:EA'
-ALI+US'
-MOA+203:1202.58'
-PRI+INV:1.179'
-LIN+2++157871:IN'
-IMD+F++:::DIFFERENT WIDGET'
-QTY+47:20:EA'
-ALI+JP'
-MOA+203:410'
-PRI+INV:20.5'
-UNS+S'
-MOA+39:2137.58'
-ALC+C+ABG'
-MOA+8:525'
-UNT+23+00000000000117'
-UNZ+1+00000000000778'
- </constant>
- </transform>
- <setHeader name="CamelAs2.ediMessageContentType">
- <constant>application/edifact</constant>
- </setHeader>
- <setHeader name="CamelAs2.ediMessageCharset">
- <constant>US-ASCII</constant>
- </setHeader>
- <setHeader name="CamelAs2.ediMessageTransferEncoding">
- <constant>7bit</constant>
- </setHeader>
- <setHeader name="CamelAs2.requestUri">
- <constant>/</constant>
- </setHeader>
- <setHeader name="CamelAs2.from">
- <constant>mrAS@example.org</constant>
- </setHeader>
- <setHeader name="CamelAs2.as2From">
- <constant>878051556</constant>
- </setHeader>
- <setHeader name="CamelAs2.as2To">
- <constant>878051556</constant>
- </setHeader>
- <setHeader name="CamelAs2.dispositionNotificationTo">
- <constant>mrAS@example.org</constant>
- </setHeader>
- <to uri="bean:provision-exchange-message-crypto"/>
- <multicast>
- <to uri="direct:plainMessage"/>
- <to uri="direct:signedMessage"/>
- <to uri="direct:envelopedMessage"/>
- <to uri="direct:envelopedSignedMessage"/>
- <to uri="direct:compressedPlainMessage"/>
- <to uri="direct:compressedSignedMessage"/>
- <to uri="direct:envelopedCompressedMessage"/>
- <to uri="direct:envelopedCompressedSignedMessage"/>
- </multicast>
- </route>
- <route id="plain-message-route">
- <from uri="direct:plainMessage"/>
- <setHeader name="CamelAs2.subject">
- <constant>AS2 Message Example</constant>
- </setHeader>
- <setHeader name="CamelAs2.as2MessageStructure">
- <simple resultType="org.apache.camel.component.as2.api.AS2MessageStructure">PLAIN</simple>
- </setHeader>
- <to
- uri="as2://client/send?inBody=ediMessage&targetHostname=localhost&targetPortNumber=8888&requestUri=/" />
- </route>
- <route id="signed-message-route">
- <from uri="direct:signedMessage"/>
- <setHeader name="CamelAs2.subject">
- <constant>Signed AS2 Message Example</constant>
- </setHeader>
- <setHeader name="CamelAs2.as2MessageStructure">
- <simple resultType="org.apache.camel.component.as2.api.AS2MessageStructure">SIGNED</simple>
- </setHeader>
- <to
- uri="as2://client/send?inBody=ediMessage&targetHostname=localhost&targetPortNumber=8888&requestUri=/" />
- </route>
- <route id="enveloped-message-route">
- <from uri="direct:envelopedMessage"/>
- <setHeader name="CamelAs2.subject">
- <constant>Enveloped AS2 Message Example</constant>
- </setHeader>
- <setHeader name="CamelAs2.as2MessageStructure">
- <simple resultType="org.apache.camel.component.as2.api.AS2MessageStructure">ENCRYPTED</simple>
- </setHeader>
- <to
- uri="as2://client/send?inBody=ediMessage&targetHostname=localhost&targetPortNumber=8888&requestUri=/" />
- </route>
- <route id="enveloped-signed-message-route">
- <from uri="direct:envelopedSignedMessage"/>
- <setHeader name="CamelAs2.subject">
- <constant>Enveloped and Signed AS2 Message Example</constant>
- </setHeader>
- <setHeader name="CamelAs2.as2MessageStructure">
- <simple resultType="org.apache.camel.component.as2.api.AS2MessageStructure">SIGNED_ENCRYPTED</simple>
- </setHeader>
- <to
- uri="as2://client/send?inBody=ediMessage&targetHostname=localhost&targetPortNumber=8888&requestUri=/" />
- </route>
- <route id="compressed-plain-message-route">
- <from uri="direct:compressedPlainMessage"/>
- <setHeader name="CamelAs2.subject">
- <constant>Compressed AS2 Message Example</constant>
- </setHeader>
- <setHeader name="CamelAs2.as2MessageStructure">
- <simple resultType="org.apache.camel.component.as2.api.AS2MessageStructure">PLAIN_COMPRESSED</simple>
- </setHeader>
- <to
- uri="as2://client/send?inBody=ediMessage&targetHostname=localhost&targetPortNumber=8888&requestUri=/" />
- </route>
- <route id="compressed-signed-message-route">
- <from uri="direct:compressedSignedMessage"/>
- <setHeader name="CamelAs2.subject">
- <constant>Compressed and Signed AS2 Message Example</constant>
- </setHeader>
- <setHeader name="CamelAs2.as2MessageStructure">
- <simple resultType="org.apache.camel.component.as2.api.AS2MessageStructure">SIGNED_COMPRESSED</simple>
- </setHeader>
- <to
- uri="as2://client/send?inBody=ediMessage&targetHostname=localhost&targetPortNumber=8888&requestUri=/" />
- </route>
- <route id="enveloped-compressed-message-route">
- <from uri="direct:envelopedCompressedMessage"/>
- <setHeader name="CamelAs2.subject">
- <constant>Enveloped and Compressed AS2 Message Example</constant>
- </setHeader>
- <setHeader name="CamelAs2.as2MessageStructure">
- <simple resultType="org.apache.camel.component.as2.api.AS2MessageStructure">ENCRYPTED_COMPRESSED</simple>
- </setHeader>
- <to
- uri="as2://client/send?inBody=ediMessage&targetHostname=localhost&targetPortNumber=8888&requestUri=/" />
- </route>
- <route id="enveloped-compressed-signed-message-route">
- <from uri="direct:envelopedCompressedSignedMessage"/>
- <setHeader name="CamelAs2.subject">
- <constant>Enveloped, Compressed and Signed AS2 Message Example</constant>
- </setHeader>
- <setHeader name="CamelAs2.as2MessageStructure">
- <simple resultType="org.apache.camel.component.as2.api.AS2MessageStructure">ENCRYPTED_COMPRESSED_SIGNED</simple>
- </setHeader>
- <to
- uri="as2://client/send?inBody=ediMessage&targetHostname=localhost&targetPortNumber=8888&requestUri=/" />
- </route>
- </camelContext>
-
- <!-- END SNIPPET: example -->
-
-</beans>
diff --git a/as2/src/main/resources/log4j.properties b/as2/src/main/resources/log4j.properties
deleted file mode 100644
index ca13a6ac..00000000
--- a/as2/src/main/resources/log4j.properties
+++ /dev/null
@@ -1,32 +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.
-## ---------------------------------------------------------------------------
-
-#
-# The logging properties used
-#
-log4j.rootLogger=INFO, out
-
-# uncomment the following line to turn on Camel debugging
-#log4j.logger.org.apache.camel=INFO
-
-# CONSOLE appender not used by default
-log4j.appender.out=org.apache.log4j.ConsoleAppender
-log4j.appender.out.layout=org.apache.log4j.PatternLayout
-log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
-
-log4j.throwableRenderer=org.apache.log4j.EnhancedThrowableRenderer
-
diff --git a/as2/src/test/java/org/apache/camel/example/as2/As2Test.java b/as2/src/test/java/org/apache/camel/example/as2/As2Test.java
deleted file mode 100644
index 36573fc2..00000000
--- a/as2/src/test/java/org/apache/camel/example/as2/As2Test.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.as2;
-
-import java.util.concurrent.TimeUnit;
-
-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.Test;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.test.context.ContextConfiguration;
-
-import static org.junit.jupiter.api.Assertions.assertTrue;
-
-/**
- * A unit test checking that the Camel works as expected with AS2.
- */
-@CamelSpringTest
-@ContextConfiguration("/META-INF/spring/camel-context.xml")
-class As2Test {
-
- @Autowired
- ModelCamelContext context;
-
- @Test
- void should_consume_and_produce_as2_messages() {
- NotifyBuilder notify = new NotifyBuilder(context).fromRoute("server-route")
- .whenCompleted(8).create();
-
- assertTrue(
- notify.matches(30, TimeUnit.SECONDS), "8 messages should be received by the AS2 server"
- );
- }
-}
diff --git a/pom.xml b/pom.xml
index 6e60003c..86eca0a7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -81,7 +81,6 @@
<modules>
<module>aggregate</module>
<module>aggregate-dist</module>
- <module>as2</module>
<module>aws</module>
<module>azure</module>
<module>basic</module>
@@ -358,8 +357,6 @@
<!-- camel-salesforce BSD license from salesforce developers -->
<exclude>**/CometDReplayExtension.java</exclude>
<exclude>**/LICENSE-SALESFORCE.txt</exclude>
- <!-- camel-as2 -->
- <exclude>**/mdnDescription.vm</exclude>
<!-- camel-jbpm -->
<exclude>**/src/main/resources/*.wid</exclude>
<!-- camel website and user-manual -->