You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2022/09/03 12:12:00 UTC

[jira] [Updated] (CAMEL-17829) camel-as2 - issue in MDN response condition

     [ 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: 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: 3.19.0
>
>
> 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)