[
https://issues.apache.org/jira/browse/CAMEL-17829?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen updated CAMEL-17829:
--------------------------------
Fix Version/s: Future
(was: 3.19.0)
> camel-as2 - issue in MDN response condition
> -------------------------------------------
>
> Key: CAMEL-17829
> URL: https://issues.apache.org/jira/browse/CAMEL-17829
> Project: Camel
> Issue Type: Bug
> Components: camel-as2
> Reporter: João Miranda
> Priority: Minor
> Fix For: Future
>
>
> The MDN implementation has a field status that can be used to tell the
> requester if the message was processed with success or if any error occurred.
> The default template has that field in {*}$dispositionType{*}.
>
> {noformat}
> private static final String DEFAULT_MDN_MESSAGE_TEMPLATE = "MDN for -\n"
> + " Message ID:
> $requestHeaders[\"Message-Id\"]\n"
> + " Subject:
> $requestHeaders[\"Subject\"]\n"
> + " Date:
> $requestHeaders[\"Date\"]\n"
> + " From:
> $requestHeaders[\"AS2-From\"]\n"
> + " To:
> $requestHeaders[\"AS2-To\"]\n"
> + " Received on:
> $responseHeaders[\"Date\"]\n"
> + " Status:
> $dispositionType \n";{noformat}
>
>
> The issue is in the condition that determines if the MDN should be returned
> with success status or error status:
>
> {noformat}
> ResponseMDN.java
> if (AS2DispositionType.FAILED.getType()
> .equals(HttpMessageUtils.getHeaderValue(request,
> AS2Header.DISPOSITION_TYPE))) {...}{noformat}
> This condition is looking at the *request header* Disposition-Type which is
> not correct. If the requester sends this header with *failed* the MDN will be
> returned with failed status regardless of the execution status of the
> receiver.
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)