You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Ralf Steppacher (Jira)" <ji...@apache.org> on 2021/12/07 20:31:00 UTC
[jira] [Created] (CAMEL-17295) REST DSL (With Servlet Component) Fails to Resolve Endpoint if Query Parameter Is Part of URI Parameter
Ralf Steppacher created CAMEL-17295:
---------------------------------------
Summary: 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
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 in 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)