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 2021/12/10 09:51:00 UTC
[jira] [Resolved] (CAMEL-17295) REST DSL (With Servlet Component) Fails to Resolve Endpoint if Query Parameter Is Part of URI Parameter
[ https://issues.apache.org/jira/browse/CAMEL-17295?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen resolved CAMEL-17295.
---------------------------------
Resolution: Fixed
> REST DSL (With Servlet Component) Fails to Resolve Endpoint if Query Parameter Is Part of URI Parameter
> -------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-17295
> URL: https://issues.apache.org/jira/browse/CAMEL-17295
> Project: Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 3.11.4
> Reporter: Ralf Steppacher
> Assignee: Claus Ibsen
> Priority: Minor
> Fix For: 3.14.0
>
>
> The following works with Camel versions {{3.11.3}} and {{3.13.0}} but fails with version {{3.11.4}}:
> {code:java}
> rest("/Assertion?authTokenSourceUri={" + HEADER_AUTH_TOKEN_SOURCE_URI + "}").id(ROUTE_REST_GET_ASSERTION)
> .get()
> .produces(MediaType.TEXT_XML_VALUE)
> .route()
> // route definition omitted
> {code}
> With version {{3.11.4}} this yields an {{org.apache.camel.ResolveEndpointFailedException}}:
> {noformat}
> Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: servlet:///Assertion?httpMethodRestrict=GET due to: There are 1 parameters that couldn't be set on the endpoint. Check the uri if the parameters are spelt correctly and that they are properties of the endpoint. Unknown parameters=[{authTokenSourceUri={authTokenSourceUri}?consumerComponentName=servlet}]
> {noformat}
> Specifying the query parameter via DSL works with all three versions:
> {code:java}
> rest("/Assertion").id(ROUTE_REST_GET_ASSERTION)
> .get()
> .param()
> .name(HEADER_AUTH_TOKEN_SOURCE_URI)
> .type(RestParamType.query)
> .endParam()
> // rest is same as above
> {code}
--
This message was sent by Atlassian Jira
(v8.20.1#820001)