camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Madhu Nair <madhu741...@gmail.com>
Subject Setting REST service URL parameters at runtime in Camel
Date Sun, 29 Jun 2014 03:09:25 GMT
Hi,
I want to pass some parameter values in my http GET request at runtime and
am not able to figure out a way to do this. The parameter is in my IN
message.  I have pasted the code snippet below:-

public class DocumentCountRouteBuilder extends RouteBuilder {

        public void configure() {

        String docUID = "${in.body.documentID}";

        from(documentServiceEndpoint)
             .setHeader(Exchange.HTTP_METHOD, constant("GET"))
.setHeader(Exchange.HTTP_URI, simple("
http://rq3l2hps1:9081/V5/ECM/Rest/content/filenet/ClaimsTargetOS/TempClaimCenterDocument/Count?"
+"&GWCC_DocUID=${in.body.documentID}"))

.toF("http://url")
                        .transform(responseTransformer)
                        .marshal(format);


I can't seem to figure out how to set the value of GWCC_DocUID at runtime.
I don't understand how Camel variables get initialized since when I log the
value of ${in.body.documentID} it logs properly.
I am new to Camel. Please help.

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