camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Giorgio Vespucci <giorgio.vespu...@gmail.com>
Subject Re: What's wrong in my REST paths?
Date Tue, 24 Mar 2015 08:41:13 GMT
Claus,
I've done a little investigation about it.

It seems that the method
ServletRestServletResolveConsumerStrategy.matchRestPath(String requestPath,
String consumerPath, boolean wildcard)
called by
ServletRestServletResolveConsumerStrategy.resolve(HttpServletRequest
request, Map<String, HttpConsumer> consumers)
doesn't take into consideration a requestPath that is not ending with a
curly brace, i.e. it considers requestPaths ending with variables only.

Then something like "markets/GHA/csv" finds a match with a consumerPath
like "{foo}/{bar}/csv"
Something (it's my case) like "markets/GHA.csv" doesn't find a match with a
consumerPath like "{foo}/{bar}.csv"

If I understood well, there's nothing I can do in the Camel Rest
configuration to change this behavior.
Am I missing something?

Best regards

On Tue, Jan 13, 2015 at 11:09 AM Giorgio Vespucci <
giorgio.vespucci@gmail.com> wrote:

> Sorry for the delay, Claus...
> I'm using a Tomcat 6 (I'm aware Camel 2.14.1 does not support Java 6, but
> I cannot change that for now) in my dev line, though on my dev machine it's
> running on Jetty, via mvn jetty:run-war.
> I'll build that test and see what happens...
> Thanks
>
> On Sun Jan 04 2015 at 14:50:30 Claus Ibsen <claus.ibsen@gmail.com> wrote:
>
>> The rest-dsl is just a facade on the choosen transport. And in your
>> case its the servlet component. So I wonder if you can get that
>> working to match a .csv uri? It may be that the servlet component from
>> either Camel or the actual impl in the java servlet server may not
>> support matching using dot. Though I would be a bit surprised.
>>
>> Maybe you can build a simple unit test in camel-servlet that just
>> tries to get a url with a .csv and see if you can get that working or
>> not. Then we can use that to track down.
>>
>> And btw what server do you use? Is it tomcat or something else?
>>
>> On Wed, Dec 31, 2014 at 9:19 AM, Giorgio Vespucci
>> <giorgio.vespucci@gmail.com> wrote:
>> > Hi all
>> > This is my SO question about Rest paths:
>> > http://stackoverflow.com/questions/27707664/whats-wrong-in-
>> my-apache-camel-rest-paths
>> >
>> > Many thanks for any hint
>> > Happy 2014 ending! :)
>>
>>
>>
>> --
>> Claus Ibsen
>> -----------------
>> Red Hat, Inc.
>> Email: cibsen@redhat.com
>> Twitter: davsclaus
>> Blog: http://davsclaus.com
>> Author of Camel in Action: http://www.manning.com/ibsen
>> hawtio: http://hawt.io/
>> fabric8 <http://hawt.io/fabric8>: http://fabric8.io/
>>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message