Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9250C1096B for ; Thu, 29 May 2014 06:45:22 +0000 (UTC) Received: (qmail 71758 invoked by uid 500); 29 May 2014 06:45:22 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 71702 invoked by uid 500); 29 May 2014 06:45:22 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Delivered-To: moderator for users@camel.apache.org Received: (qmail 41854 invoked by uid 99); 29 May 2014 06:13:30 -0000 X-ASF-Spam-Status: No, hits=1.3 required=5.0 tests=SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy includes SPF record at spf.trusted-forwarder.org) Date: Wed, 28 May 2014 23:13:05 -0700 (PDT) From: sleeper To: users@camel.apache.org Message-ID: <1401343985088-5751684.post@n5.nabble.com> Subject: How could I post a Map to my restful api by camel? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org I have a web app,which provides some restful api,some of them have been marked as @POST. In my camel router,I wanna post a Map params to the restful api,how could I do it? Exchange res = template.request("direct:///start", new Processor() { public void process(Exchange exchange) throws Exception { exchange.getIn().setHeader("to", targetApp);//targetApp is my restful api uri exchange.getOut().setBody(params);//params is a java.util.Map type } }); here is the problem 1)when I set the map type into the body,My rest can not get the request. 2)when I turn the map into a String type,My rest get the request,but where is my params data gone?? -- View this message in context: http://camel.465427.n5.nabble.com/How-could-I-post-a-Map-to-my-restful-api-by-camel-tp5751684.html Sent from the Camel - Users mailing list archive at Nabble.com.