You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Willem Jiang (JIRA)" <ji...@apache.org> on 2015/03/18 12:37:38 UTC
[jira] [Commented] (CAMEL-8505) Missed
CamelSchematronValidationStatus header
[ https://issues.apache.org/jira/browse/CAMEL-8505?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14367003#comment-14367003 ]
Willem Jiang commented on CAMEL-8505:
-------------------------------------
We cannot setup the header on the out message if the message exchange pattern is not InOut. I just commit a quick fix into camel master and merge the patch back to camel-2.15.x and camel-2.14.x branches.
> Missed CamelSchematronValidationStatus header
> ---------------------------------------------
>
> Key: CAMEL-8505
> URL: https://issues.apache.org/jira/browse/CAMEL-8505
> Project: Camel
> Issue Type: Bug
> Components: camel-schematron
> Affects Versions: 2.14.0
> Reporter: Sergey
> Assignee: Willem Jiang
>
> CamelSchematronValidationStatus header missed somewhere in this method of SchematronProducer class:
> {code:java}
> /**
> * Sets validation report and status
> *
> * @param exchange
> * @param report
> * @param status
> */
> private void setValidationReport(Exchange exchange, String report, String status) {
> // if exchange pattern is In and Out set details on the Out message.
> Map<String, Object> headers = new HashMap<String, Object>();
> headers.put(Constants.VALIDATION_STATUS, status);
> headers.put(Constants.VALIDATION_REPORT, report);
> exchange.getOut().setHeader(Constants.VALIDATION_REPORT, report);
> if (exchange.getPattern().isOutCapable()) {
> exchange.getOut().setHeaders(exchange.getIn().getHeaders());
> exchange.getOut().getHeaders().putAll(headers);
> } else {
> exchange.getIn().getHeaders().putAll(headers);
> }
> }
> {code}
> status variable value is SUCCESS here, but right after:
> {code:xml}
> <to uri="schematron:schematron/dogs.sch" />
> {code}
> there is no such header - only CamelSchematronValidationReport present.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)