camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From paramjyotsingh <paramjyotsi...@gmail.com>
Subject Re: jetty:http dynamic uri in consumer (from)
Date Thu, 23 May 2013 01:26:16 GMT
Hi Claus,

I it does work with 'matchOnUriPrefix' but if i used that i have to do
special handling to extract PathParams.

Just to continue with my original problem, i was using restlet as it
supports dynamic parameters, for example:-

if my uri on restlet is like http://localhost:9080/boxes/{boxId}|{boxDate}

camel automatically extracts and puts value of 'boxId' and 'boxDate' in
Exchange header and no special handling is required. But issue with restlet
is that connection is not getting closed when route processing is completed.
if i have a route like

<route id="test1">
  <from uri="http://localhost:9080/boxes/{boxId}|{boxDate}" />
  <log message="Box identifer : ${header.boxId} :: ${header.boxDate}" />
  <setBody>
     <simple> Received request for ${header.boxId}</simple>
  </setBody>
  <log message="Route completed" />
</route>

now when i invoke this service suppose with most generic client 'telnet'

I get following log message at camel end:
------
Box identifer : 1234 :: 2013-05-20
Route completed
-------

But on client end(command prompt):
--------
telnet localhost 9080

GET /boxes/1234/2013-05-20 HTTP/1.1


Received request for 1234
---

And connection remains open, i should get something like connection
"connection closed by remote host".
I do get this if i use cxfrs or jetty to expose restful service, but it
doesn;t work in same way with restlet.

Could you please suggest if something is work with camel-restlet or with
restlet library itself.

Thanks and Regards,
Param



--
View this message in context: http://camel.465427.n5.nabble.com/jetty-http-dynamic-uri-in-consumer-from-tp5732691p5732988.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message