camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Asgeir Frimannsson <asge...@gmail.com>
Subject Re: Problem with Camel rest in OSGi
Date Fri, 07 Nov 2014 14:48:34 GMT
There is however a small (1 character) bug in 2.14 where endpointProperties
are ignored:

In org.apache.camel.component.servlet.ServletComponent:createConsumer (and
similar for other REST-aware endpoints):

        String url = "servlet:///%s?httpMethodRestrict=%s";
        if (!query.isEmpty()) {
            url = url + *"?"* + query;
        }
...which would cause multiple '?' arguments in the url. Fixed by replacing
'?' with '&'...

cheers,
asgeir


On Fri, Nov 7, 2014 at 10:10 AM, Claus Ibsen <claus.ibsen@gmail.com> wrote:

> Hi
>
> I have updated that page to explain that better. And btw its only when
> using the servlet component.
> https://cwiki.apache.org/confluence/display/CAMEL/Rest+DSL
>
> On Fri, Nov 7, 2014 at 10:07 AM, Claus Ibsen <claus.ibsen@gmail.com>
> wrote:
> > The port is only for human and tooling such as JMX, swagger, etc.
> >
> > The actual port is configured by the component you use, and as you use
> > servlet its the HTTP service from OSGi. In Karaf that service uses by
> > default port 8181.
> >
> >
> >
> > On Fri, Nov 7, 2014 at 9:47 AM, amjr <amjr@me.com> wrote:
> >> Hi!
> >>
> >> I'm creating an OSGi bundle which uses blueprint to configure Camel
> routes.
> >> It looks like rest-endpoint doesn't listen to configured port.
> >>
> >> In blueprint.xml I have the following:
> >>
> >>
> >> And MailRouteBuilder java class builds the route:
> >>
> >>
> >>
> >> Project builds and CamelContext starts when I install the OSGi bundle
> but
> >> port 8080 is not listening. Am I missing something here? Or what is the
> >> reason for the port not going into listen-mode.
> >>
> >>
> >>
> >>
> >> --
> >> View this message in context:
> http://camel.465427.n5.nabble.com/Problem-with-Camel-rest-in-OSGi-tp5758649.html
> >> Sent from the Camel - Users mailing list archive at Nabble.com.
> >
> >
> >
> > --
> > 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://fabric8.io/
>
>
>
> --
> 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://fabric8.io/
>

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