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-jbang-examples.git
The following commit(s) were added to refs/heads/main by this push: new 3bc82d2 Upgrade smooks example to 4.11.0 3bc82d2 is described below commit 3bc82d2c0ab28de6d18f510e235e946b416100af Author: Aurélien Pupier <apup...@redhat.com> AuthorDate: Thu Apr 3 15:27:40 2025 +0200 Upgrade smooks example to 4.11.0 Requires to adapt to API breaking change in Camel 4.11 related to the AS2 content type see https://github.com/apache/camel/commit/5d964ff96680d58985250701352de1a384ab6806 Signed-off-by: Aurélien Pupier <apup...@redhat.com> --- edi-x12-as2/README.adoc | 2 +- edi-x12-as2/camel/App.java | 4 ++-- edi-x12-as2/camel/edi-x12-as2.camel.yaml | 3 ++- edi-x12-as2/test/edi-x12-as2.camel.it.yaml | 4 ++-- edi-x12-as2/test/jbang.properties | 2 +- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/edi-x12-as2/README.adoc b/edi-x12-as2/README.adoc index e170e2d..5d9902c 100644 --- a/edi-x12-as2/README.adoc +++ b/edi-x12-as2/README.adoc @@ -24,7 +24,7 @@ include::../install.adoc[see installation] [source,shell] ---- - camel cmd send --body="$(cat test/payload.edi)" --endpoint="as2:client/send?inBody=ediMessage&targetHostName=localhost&targetPortNumber=8081&ediMessageContentType=application/edi-x12;charset=US-ASCII&as2From=acme&as2To=mycorp&from=al...@example.org&requestUri=/mycorp/orders&subject=Purchase Order&as2MessageStructure=PLAIN" + camel cmd send --body="$(cat test/payload.edi)" --endpoint="as2:client/send?inBody=ediMessage&targetHostName=localhost&targetPortNumber=8081&ediMessageContentType=application/edi-x12&ediMessageCharset=US-ASCII&as2From=acme&as2To=mycorp&from=al...@example.org&requestUri=/mycorp/orders&subject=Purchase Order&as2MessageStructure=PLAIN" ---- The above command will send an AS2 message where the body is read from the local file named `payload.edi`. The message is sent to the running Camel integration that will process the AS2 message. The Camel integration will then consume the payload and print to the console: diff --git a/edi-x12-as2/camel/App.java b/edi-x12-as2/camel/App.java index c3cd9f2..2d5edd6 100644 --- a/edi-x12-as2/camel/App.java +++ b/edi-x12-as2/camel/App.java @@ -1,4 +1,4 @@ //DEPS org.apache.activemq:artemis-jakarta-server:2.40.0 -//DEPS org.apache.camel:camel-http:4.10.0 +//DEPS org.apache.camel:camel-http:4.11.0 //DEPS org.smooks.cartridges.edi:smooks-edi-cartridge:2.1.0 -//DEPS org.smooks.cartridges:smooks-templating-cartridge:2.1.2 \ No newline at end of file +//DEPS org.smooks.cartridges:smooks-templating-cartridge:2.1.2 diff --git a/edi-x12-as2/camel/edi-x12-as2.camel.yaml b/edi-x12-as2/camel/edi-x12-as2.camel.yaml index e8e5541..36a4eaa 100644 --- a/edi-x12-as2/camel/edi-x12-as2.camel.yaml +++ b/edi-x12-as2/camel/edi-x12-as2.camel.yaml @@ -57,7 +57,8 @@ parameters: targetHostName: "{{partner.host.name}}" targetPortNumber: 8081 - ediMessageContentType: application/edi-x12;charset=US-ASCII + ediMessageContentType: application/edi-x12 + ediMessageCharset: charset=US-ASCII as2To: acme as2From: mycorp from: b...@example.org diff --git a/edi-x12-as2/test/edi-x12-as2.camel.it.yaml b/edi-x12-as2/test/edi-x12-as2.camel.it.yaml index e5eb2d1..c24f375 100644 --- a/edi-x12-as2/test/edi-x12-as2.camel.it.yaml +++ b/edi-x12-as2/test/edi-x12-as2.camel.it.yaml @@ -15,7 +15,7 @@ actions: file: "compose.yaml" - camel: jbang: - camelVersion: 4.10.0 + camelVersion: 4.11.0 run: resources: - "../camel/App.java" @@ -31,7 +31,7 @@ actions: startContext: {} - send: endpoint: | - camel:as2:client/send?inBody=ediMessage&targetHostName=localhost&targetPortNumber=8081&ediMessageContentType=application%2Fedi-x12%3Bcharset%3DUS-ASCII&as2To=acme&as2From=mycorp&from=b...@example.org&requestUri=/mycorp/orders&subject=Purchase Order&as2MessageStructure=PLAIN + camel:as2:client/send?inBody=ediMessage&targetHostName=localhost&targetPortNumber=8081&ediMessageContentType=application%2Fedi-x12&ediMessageCharset=US-ASCII&as2To=acme&as2From=mycorp&from=b...@example.org&requestUri=/mycorp/orders&subject=Purchase Order&as2MessageStructure=PLAIN message: body: resource: diff --git a/edi-x12-as2/test/jbang.properties b/edi-x12-as2/test/jbang.properties index 0252d6d..fa36f4c 100644 --- a/edi-x12-as2/test/jbang.properties +++ b/edi-x12-as2/test/jbang.properties @@ -3,4 +3,4 @@ run.deps=org.citrusframework:citrus-camel:4.5.2,\ org.citrusframework:citrus-testcontainers:4.5.2,\ org.citrusframework:citrus-jms:4.5.2,\ org.apache.activemq:artemis-jakarta-client:2.40.0,\ - org.apache.camel:camel-as2:4.10.0 \ No newline at end of file + org.apache.camel:camel-as2:4.11.0