Skip to content

Commit

Permalink
CAMEL-21090: camel-as2 fix wrong header name prefix.
Browse files Browse the repository at this point in the history
  • Loading branch information
davsclaus committed Aug 15, 2024
1 parent 24e55fd commit a332445
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ 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());
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());

}

Expand Down
46 changes: 23 additions & 23 deletions as2/src/main/resources/META-INF/spring/camel-context.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,25 +69,25 @@ UNT+23+00000000000117'
UNZ+1+00000000000778'
</constant>
</transform>
<setHeader name="CamelAS2.ediMessageContentType">
<setHeader name="CamelAs2.ediMessageContentType">
<simple resultType="org.apache.hc.core5.http.ContentType">application/edifact;charset=US-ASCII</simple>
</setHeader>
<setHeader name="CamelAS2.ediMessageTransferEncoding">
<setHeader name="CamelAs2.ediMessageTransferEncoding">
<constant>7bit</constant>
</setHeader>
<setHeader name="CamelAS2.requestUri">
<setHeader name="CamelAs2.requestUri">
<constant>/</constant>
</setHeader>
<setHeader name="CamelAS2.from">
<setHeader name="CamelAs2.from">
<constant>[email protected]</constant>
</setHeader>
<setHeader name="CamelAS2.as2From">
<setHeader name="CamelAs2.as2From">
<constant>878051556</constant>
</setHeader>
<setHeader name="CamelAS2.as2To">
<setHeader name="CamelAs2.as2To">
<constant>878051556</constant>
</setHeader>
<setHeader name="CamelAS2.dispositionNotificationTo">
<setHeader name="CamelAs2.dispositionNotificationTo">
<constant>[email protected]</constant>
</setHeader>
<to uri="bean:provision-exchange-message-crypto"/>
Expand All @@ -104,87 +104,87 @@ UNZ+1+00000000000778'
</route>
<route id="plain-message-route">
<from uri="direct:plainMessage"/>
<setHeader name="CamelAS2.subject">
<setHeader name="CamelAs2.subject">
<constant>AS2 Message Example</constant>
</setHeader>
<setHeader name="CamelAS2.as2MessageStructure">
<setHeader name="CamelAs2.as2MessageStructure">
<simple resultType="org.apache.camel.component.as2.api.AS2MessageStructure">PLAIN</simple>
</setHeader>
<to
uri="as2://client/send?inBody=ediMessage&amp;targetHostname=localhost&amp;targetPortNumber=8888&amp;requestUri=/" />
</route>
<route id="signed-message-route">
<from uri="direct:signedMessage"/>
<setHeader name="CamelAS2.subject">
<setHeader name="CamelAs2.subject">
<constant>Signed AS2 Message Example</constant>
</setHeader>
<setHeader name="CamelAS2.as2MessageStructure">
<setHeader name="CamelAs2.as2MessageStructure">
<simple resultType="org.apache.camel.component.as2.api.AS2MessageStructure">SIGNED</simple>
</setHeader>
<to
uri="as2://client/send?inBody=ediMessage&amp;targetHostname=localhost&amp;targetPortNumber=8888&amp;requestUri=/" />
</route>
<route id="enveloped-message-route">
<from uri="direct:envelopedMessage"/>
<setHeader name="CamelAS2.subject">
<setHeader name="CamelAs2.subject">
<constant>Enveloped AS2 Message Example</constant>
</setHeader>
<setHeader name="CamelAS2.as2MessageStructure">
<setHeader name="CamelAs2.as2MessageStructure">
<simple resultType="org.apache.camel.component.as2.api.AS2MessageStructure">ENCRYPTED</simple>
</setHeader>
<to
uri="as2://client/send?inBody=ediMessage&amp;targetHostname=localhost&amp;targetPortNumber=8888&amp;requestUri=/" />
</route>
<route id="enveloped-signed-message-route">
<from uri="direct:envelopedSignedMessage"/>
<setHeader name="CamelAS2.subject">
<setHeader name="CamelAs2.subject">
<constant>Enveloped and Signed AS2 Message Example</constant>
</setHeader>
<setHeader name="CamelAS2.as2MessageStructure">
<setHeader name="CamelAs2.as2MessageStructure">
<simple resultType="org.apache.camel.component.as2.api.AS2MessageStructure">SIGNED_ENCRYPTED</simple>
</setHeader>
<to
uri="as2://client/send?inBody=ediMessage&amp;targetHostname=localhost&amp;targetPortNumber=8888&amp;requestUri=/" />
</route>
<route id="compressed-plain-message-route">
<from uri="direct:compressedPlainMessage"/>
<setHeader name="CamelAS2.subject">
<setHeader name="CamelAs2.subject">
<constant>Compressed AS2 Message Example</constant>
</setHeader>
<setHeader name="CamelAS2.as2MessageStructure">
<setHeader name="CamelAs2.as2MessageStructure">
<simple resultType="org.apache.camel.component.as2.api.AS2MessageStructure">PLAIN_COMPRESSED</simple>
</setHeader>
<to
uri="as2://client/send?inBody=ediMessage&amp;targetHostname=localhost&amp;targetPortNumber=8888&amp;requestUri=/" />
</route>
<route id="compressed-signed-message-route">
<from uri="direct:compressedSignedMessage"/>
<setHeader name="CamelAS2.subject">
<setHeader name="CamelAs2.subject">
<constant>Compressed and Signed AS2 Message Example</constant>
</setHeader>
<setHeader name="CamelAS2.as2MessageStructure">
<setHeader name="CamelAs2.as2MessageStructure">
<simple resultType="org.apache.camel.component.as2.api.AS2MessageStructure">SIGNED_COMPRESSED</simple>
</setHeader>
<to
uri="as2://client/send?inBody=ediMessage&amp;targetHostname=localhost&amp;targetPortNumber=8888&amp;requestUri=/" />
</route>
<route id="enveloped-compressed-message-route">
<from uri="direct:envelopedCompressedMessage"/>
<setHeader name="CamelAS2.subject">
<setHeader name="CamelAs2.subject">
<constant>Enveloped and Compressed AS2 Message Example</constant>
</setHeader>
<setHeader name="CamelAS2.as2MessageStructure">
<setHeader name="CamelAs2.as2MessageStructure">
<simple resultType="org.apache.camel.component.as2.api.AS2MessageStructure">ENCRYPTED_COMPRESSED</simple>
</setHeader>
<to
uri="as2://client/send?inBody=ediMessage&amp;targetHostname=localhost&amp;targetPortNumber=8888&amp;requestUri=/" />
</route>
<route id="enveloped-compressed-signed-message-route">
<from uri="direct:envelopedCompressedSignedMessage"/>
<setHeader name="CamelAS2.subject">
<setHeader name="CamelAs2.subject">
<constant>Enveloped, Compressed and Signed AS2 Message Example</constant>
</setHeader>
<setHeader name="CamelAS2.as2MessageStructure">
<setHeader name="CamelAs2.as2MessageStructure">
<simple resultType="org.apache.camel.component.as2.api.AS2MessageStructure">ENCRYPTED_COMPRESSED_SIGNED</simple>
</setHeader>
<to
Expand Down

0 comments on commit a332445

Please sign in to comment.