Return-Path: X-Original-To: apmail-camel-issues-archive@minotaur.apache.org Delivered-To: apmail-camel-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3C9C018763 for ; Tue, 29 Sep 2015 06:37:05 +0000 (UTC) Received: (qmail 11289 invoked by uid 500); 29 Sep 2015 06:37:05 -0000 Delivered-To: apmail-camel-issues-archive@camel.apache.org Received: (qmail 11254 invoked by uid 500); 29 Sep 2015 06:37:05 -0000 Mailing-List: contact issues-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list issues@camel.apache.org Received: (qmail 11244 invoked by uid 99); 29 Sep 2015 06:37:05 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Sep 2015 06:37:05 +0000 Date: Tue, 29 Sep 2015 06:37:05 +0000 (UTC) From: "Claus Ibsen (JIRA)" To: issues@camel.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (CAMEL-9034) Replace hardcoded JettyRestHttpBinding instantiation in JettyHttpComponent MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CAMEL-9034?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Claus Ibsen resolved CAMEL-9034. -------------------------------- Resolution: Won't Fix This is intended when using rest-dsl. See the link to that other ticket > Replace hardcoded JettyRestHttpBinding instantiation in JettyHttpComponent > -------------------------------------------------------------------------- > > Key: CAMEL-9034 > URL: https://issues.apache.org/jira/browse/CAMEL-9034 > Project: Camel > Issue Type: Improvement > Components: camel-jetty > Affects Versions: 2.15.2 > Reporter: Christian Bauer > Priority: Minor > > The code in JettyHttpComponent seems to ignore any httpBindingRef endpoint property, at least if you use the REST DSL. It always creates a consumer with this binding if the RestConsumerFactory#createConsumer extension is used: > {code} > endpoint.setBinding(new JettyRestHttpBinding(endpoint)); > {code} > This makes it impossible to configure custom error responses by overriding the doWriteExceptionResponse method of the binding, as documented. > My actual case is an (invalid) Java instance I'm transforming to JSON with Jackson. This happens in RestBindingMarshalOnCompletion#onAfterRoute and the only way to catch an exception at this stage seems to be in the HttpBinding. > Note that this means users of the REST DSL will always return 500 errors with full stacktraces on marshalling failures. -- This message was sent by Atlassian JIRA (v6.3.4#6332)