gnodet-bot commented on code in PR #28347:
URL: https://github.com/apache/camel/pull/28347#discussion_r4439856073
##########
catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/as2-component.adoc:
##########
@@ -54,3 +54,57 @@ producers, strip these internal headers at the trust
boundary -- for example wit
`removeHeaders("Camel*")` -- before the message reaches this component, so
that a sender cannot
override the API call. See xref:manual::security-model.adoc[the Camel security
model] for details.
====
+
+
+== Usage
+
+An `as2://server/listen` consumer receives AS2 messages on `serverPortNumber`,
for the request URIs that match
+`requestUriPattern`. An `as2://client/send` producer sends the message body
(`inBody: ediMessage`) to
+`targetHostname` and `targetPortNumber`. The following routes send a plain
EDIFACT message from one to the other:
+
+[source,yaml]
+----
+- route:
+ from:
+ uri: as2://server/listen
+ parameters:
+ serverPortNumber: 8888
+ requestUriPattern: /receiver
+ steps:
+ - log:
+ message: "Received EDI message: ${body}"
+- route:
+ from:
+ uri: timer:send
+ parameters:
+ repeatCount: 1
+ steps:
+ - setBody:
+ expression:
+ constant:
+ expression: "UNB+UNOA:1+SENDER+RECEIVER+260101:1200+1'UNZ+1+1'"
+ - to:
+ uri: as2://client/send
+ parameters:
+ inBody: ediMessage
+ targetHostname: localhost
+ targetPortNumber: 8888
+ requestUri: /receiver
+ as2From: sender
+ as2To: receiver
+ from: [email protected]
+ subject: Order
+ as2MessageStructure: PLAIN
+ ediMessageContentType: application/edifact
+----
+
+A `SIGNED`, `ENCRYPTED` or `SIGNED_ENCRYPTED` message structure also needs the
keys and certificates of the signing
+and encrypting options.
+
+Several `as2://server/listen` consumers can share a `serverPortNumber`, each
with its own `requestUriPattern`. Each
+consumer applies its own keys and certificates and its own asynchronous MDN
settings (`mdnUserName`, `mdnPassword`,
+`mdnAccessToken` and `asyncMdnAllowedHosts`) to the messages received on its
own pattern.
+
+The settings of the shared server connection still come from the first
endpoint created on the port:
+`sslContextParameters` and `sslContext` (used for the TLS listener and for the
https delivery of asynchronous MDNs),
Review Comment:
⚠️ **Documentation inaccuracy:** This line claims `sslContext` is used "for
the https delivery of asynchronous MDNs," but on this branch
`AS2AsynchronousMDNManager` explicitly throws:
```java
throw new HttpException("... TLS delivery of asynchronous MDNs is not
supported");
```
The 9-argument constructor called in `handleAsynchronousMDN()` does not
receive `sslContext` at all — it is only used for the TLS listener
(`RequestAcceptorThread`). The parenthetical `(used for the TLS listener and
for the https delivery of asynchronous MDNs)` should be corrected to `(used for
the TLS listener)`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]