Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id D3CFC200BCA for ; Mon, 21 Nov 2016 16:39:47 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id D25F2160AF9; Mon, 21 Nov 2016 15:39:47 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 27E29160AEF for ; Mon, 21 Nov 2016 16:39:47 +0100 (CET) Received: (qmail 17856 invoked by uid 500); 21 Nov 2016 15:39:46 -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 83303 invoked by uid 99); 21 Nov 2016 15:29:34 -0000 X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.999 X-Spam-Level: * X-Spam-Status: No, score=1.999 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=koghi-com.20150623.gappssmtp.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=koghi-com.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to; bh=QG3Dr/RqSWIylI0Kve0o47AW226YKdDhE2J1pSVlUjk=; b=XrFxYSFi/MklLr2DbPJPSGaUIhXVHE9yYxlb+UT21pMsDyZAS/lgENdJzWiM8vUgwl DOJvrleMGRyPQhBl3VJpNNrYvL5+ce5vsU1p3MURE3ZI/26/VQ2nQMcUDxoVsgBEn35c YeoTbmQ3oVkDH7KpOAh6BpH7DMREbqDdjPQ6S6Y/dLehgRGcBizveYVL0TX+GZrZ69uN dbxcEFHTpOPFbbSz+PzlWXcpY09/74zfpFvh3TUjIFPBkurUVTv4eqffmSSAeymxFApE 6VM/lV+d2DJhWPcFjk2r20S9ihQEJ36sVAft9QPbufeGC3Tk3I6CJoxoqeRv4HfjrEfv cwUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=QG3Dr/RqSWIylI0Kve0o47AW226YKdDhE2J1pSVlUjk=; b=LuCunytmgOEoMsgXoWKclvBHDfuczN5zEjI5C7UIvrRdFARP2TZMuI1tUJm9lXlS/v qH/1G5rMT4WT3kRTINETieIiTxkV+jEErQOavFi096c6rVMFscbh9ttuG8syJw1yc9dE LXP802RNsroIzqyAwgECMdpreEv/MPwATyhYi7myhsLTVMrKbwsaWiEQtSMoWE0Vjorx uddriNIsOIKFZEf1ibosvHQ6hCsHnuqWhkn8zHZnQWewp+94PuZF6WIDcrs37Qcny+E4 zInDd831Ci9vjkcSeRGMJm/AWjKpKxSiAMN12iskV9NU0oAJksLWtdqwpW42MpMgTWFF EtSw== X-Gm-Message-State: AKaTC01OTk0DZzMDaRN/c3v4xxZohwAx1qH2g57OxcgrLN+LAwziub3OH3pLpIHDJcv7OOXN4siSsnRkJExVxw== X-Received: by 10.31.89.133 with SMTP id n127mr5832904vkb.144.1479742166008; Mon, 21 Nov 2016 07:29:26 -0800 (PST) MIME-Version: 1.0 X-Originating-IP: [190.147.154.155] From: Daniel Arias Ramirez Date: Mon, 21 Nov 2016 10:29:25 -0500 Message-ID: Subject: send reply body after finishing complete route To: users@camel.apache.org Content-Type: multipart/alternative; boundary=001a114e3ac62a16340541d15208 archived-at: Mon, 21 Nov 2016 15:39:48 -0000 --001a114e3ac62a16340541d15208 Content-Type: text/plain; charset=UTF-8 Hi, I'm trying to make a synchronous call to an activemq sending a body right after I process some rest service invocation. Here is my code: some process here.. sent to this route. private String velocitySetThirdPartyTemplate = "velocity:file://url/velocity/file/SetThirdParty_Template.vm"; from("direct:QueueThirdParty") .process(new ProcessThirdPartyError()) .marshal() .xstream("UTF-8") // wait for the body when the response of the Web Service is 200 ok .to(ExchangePattern.InOut,"jms:queue:CreateThirdParty") .to("activemq:queue:somequeue"); from("jms:queue:CreateThirdParty") .transacted() .unmarshal() .xstream() .process(new SetBodyThirdParty())->this route define body as an ArrayList of Pojo .split(body()) .to(velocitySetThirdPartyTemplate)->this velocity make the json required for the Web Service .process(new RestHeadersSetThirdParty()) .to("restlet:http://ip:port/Web/Service/url" + "?restletMethod=post&throwExceptionOnFailure") .process(new ResponseProcess()) .log("response ${in.body.getStatus().getCode()}") .process(new SetExchangeInOutBody()); -> this final process set the body that I want to send to the activemq in that is waiting for the reply. the problem is that the body that is sending to the end point "activemq:queue:somequeue" after waiting for a reply is the ArrayList of POJO before the split. Any Idea of how to send the body of the ".process(new SetExchangeInOutBody());" that is the one I need. Thanks in advance. Daniel Felipe Arias. --001a114e3ac62a16340541d15208--