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 ACC2195BC for ; Tue, 9 Dec 2014 09:29:27 +0000 (UTC) Received: (qmail 24351 invoked by uid 500); 9 Dec 2014 09:29:27 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 24281 invoked by uid 500); 9 Dec 2014 09:29:27 -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 Received: (qmail 23541 invoked by uid 99); 9 Dec 2014 09:29:26 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Dec 2014 09:29:26 +0000 X-ASF-Spam-Status: No, hits=2.3 required=5.0 tests=SPF_SOFTFAIL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: softfail (nike.apache.org: transitioning domain of contactreji@gmail.com does not designate 162.253.133.43 as permitted sender) Received: from [162.253.133.43] (HELO mwork.nabble.com) (162.253.133.43) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Dec 2014 09:29:00 +0000 Received: from msam.nabble.com (unknown [162.253.133.85]) by mwork.nabble.com (Postfix) with ESMTP id 98AC9D198CF for ; Tue, 9 Dec 2014 01:27:59 -0800 (PST) Date: Tue, 9 Dec 2014 02:27:58 -0700 (MST) From: contactreji To: users@camel.apache.org Message-ID: <1418117278776-5760370.post@n5.nabble.com> Subject: Camel REstlet -Response MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hi I am trying to use RESTLET component to create a rest service. My requirement is to 1) pass the 2 parameters called "id" and "firstName" 2) create a Object of Customer class and set its class variables id and Name with above parameters 3) Return the customer object so that my SOAP UI shows up the XML representation of the customer object. My Camel Route file is as follows * * and my Java processor is as follows package com.mycompany.restPOC; * import javax.ws.rs.core.Response; import org.apache.camel.Exchange; import org.apache.camel.Processor; import org.apache.camel.component.restlet.RestletConstants; import org.apache.log4j.Logger; public class ProcessRestMessage implements Processor { protected Logger log = Logger.getLogger(getClass()); @Override public void process(Exchange exchange) throws Exception { Customer customer=new Customer(); customer.setId("1"); customer.setName("abc"); log.info(customer.getId() + " " + customer.getName()); exchange.getIn().setBody(Response.ok().type("application/xml").entity(customer).build()); } } * When I push the data from SoapUI, I get following log in camel [ Restlet-20381868] ProcessRestMessage INFO 1 abc Dec 09, 2014 2:49:46 PM org.restlet.engine.log.LogFilter afterHandle INFO: 2014-12-09 14:49:46 10.132.146.177 - - 9192 POST /demo firstName=Reji&id=Mathews 200 0 0 0 http://d-113063918:9192 Apache-HttpClient/4.1.1 (java 1.5) - And as response I get only following in SoapUI Output window Can you help me in arranging things so that I get xml equalient of customer object? Cheers Reji -- View this message in context: http://camel.465427.n5.nabble.com/Camel-REstlet-Response-tp5760370.html Sent from the Camel - Users mailing list archive at Nabble.com.