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 9D552DC8B for ; Fri, 14 Dec 2012 13:19:09 +0000 (UTC) Received: (qmail 74637 invoked by uid 500); 14 Dec 2012 13:19:09 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 73927 invoked by uid 500); 14 Dec 2012 13:19:04 -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 73889 invoked by uid 99); 14 Dec 2012 13:19:02 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Dec 2012 13:19:02 +0000 X-ASF-Spam-Status: No, hits=2.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_NEUTRAL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [62.179.121.40] (HELO fep20.mx.upcmail.net) (62.179.121.40) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Dec 2012 13:18:54 +0000 Received: from edge02.upcmail.net ([192.168.13.237]) by viefep20-int.chello.at (InterMail vM.8.01.05.05 201-2260-151-110-20120111) with ESMTP id <20121214131831.KHJL11920.viefep20-int.chello.at@edge02.upcmail.net> for ; Fri, 14 Dec 2012 14:18:31 +0100 Received: from [10.0.0.6] ([46.126.159.149]) by edge02.upcmail.net with edge id bRJk1k0143DhZoW01RJlu4; Fri, 14 Dec 2012 14:18:45 +0100 X-SourceIP: 46.126.159.149 X-Authenticated-Sender: babak.vahdat@swissonline.ch User-Agent: Microsoft-MacOutlook/14.14.0.111121 Date: Fri, 14 Dec 2012 14:18:27 +0100 Subject: Re: camel-quickfix RequestReplyExample java.io.IOException From: Babak Vahdat To: Message-ID: Thread-Topic: camel-quickfix RequestReplyExample java.io.IOException In-Reply-To: <1355416778938-5724048.post@n5.nabble.com> Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Am 13.12.12 17:39 schrieb "lawkai" unter : >Hi Babak, > >I have checked out your patch and it seems the exception is gone. > >However, I have noticed one problem. > >Please correct me if I am wrong. In the example, I think the original >author >was trying to transform a http request (via Jetty) into the >OrderStatusRequest and routes it (via routingSlip) to >MarketOrderStatusService to get an ExecutionReport response. And finally, >transform it into Json format and sends it back via http. > >However, with your patch, the Json response that I got is an >OrderStatusRequest instead of an ExecutionReport response. > >This is output that I got from the log: > >2012-12-14 00:15:49,684 [main ] INFO RequestReplyExample > >- Web request response: >"message": { > "header": { > "BeginString": "FIX.4.2", > "BodyLength": 82, > "MsgSeqNum": 2, > "MsgType": [ "H", "OrderStatusRequest" ], > "SenderCompID": "TRADER", > "SendingTime": "20121213-16:15:16.107", > "TargetCompID": "MARKET" > } > > "body": { > "ClOrdID": "XYZ", > "OrderID": "abc", > "Side": [ "1", "BUY" ], > "Symbol": "GOOG" > } > > "trailer": { > "CheckSum": "144" > } > >} > >Is there something we need to change in the route as well? >Appreciate your help. I already fixed this as well. What you should be able to see now is both OrderStatusRequest as well as ExecutionReport in JSON format: 2012-12-14 13:49:31,542 [main ] INFO RequestReplyExample - Web request: "message": { "header": { "BeginString": "FIX.4.2", "BodyLength": 82, "MsgSeqNum": 2, "MsgType": [ "H", "OrderStatusRequest" ], "SenderCompID": "TRADER", "SendingTime": "20121214-12:49:31.516", "TargetCompID": "MARKET" } "body": { "ClOrdID": "XYZ", "OrderID": "abc", "Side": [ "1", "BUY" ], "Symbol": "GOOG" } "trailer": { "CheckSum": "149" } } 2012-12-14 13:49:31,542 [main ] INFO RequestReplyExample - Shutting down Camel context 2012-12-14 13:49:31,542 [main ] INFO DefaultCamelContext - Apache Camel (CamelContext: camel-1) is shutting down 2012-12-14 13:49:31,544 [main ] INFO DefaultShutdownStrategy - Starting to graceful shutdown 3 routes (timeout 300 seconds) 2012-12-14 13:49:31,548 [ssage Processor] INFO QuickfixjMessageJsonPrinter - "event": { "eventcategory": AppMessageReceived, "breadcrumbid": ID-Babaks-iMac-local-49411-1355489368665-0-23, "messagetype": H, "sessionid": FIX.4.2:MARKET->TRADER, "message": { "header": { "BeginString": "FIX.4.2", "MsgType": [ "8", "ExecutionReport" ] } "body": { "AvgPx": 0, "CumQty": 0, "ExecID": "15cdd78b-8562-49f6-ac7b-2302e385d550", "ExecTransType": [ "3", "STATUS" ], "OrderID": "abc", "OrdStatus": [ "8", "REJECTED" ], "Side": [ "1", "BUY" ], "Symbol": "GOOG", "ExecType": [ "8", "REJECTED" ], "LeavesQty": 100 } "trailer": { } } } Please also note that running the example on the trunk you would see a proper nice log entry for ExecutionReport through log4j (see above) BUT on the 2.10.x branch that JSON string is logged through the System.out PrintStream. The reason for this is that the following ticket has not been back-ported to this branch: https://issues.apache.org/jira/browse/CAMEL-5672 Babak > > > >-- >View this message in context: >http://camel.465427.n5.nabble.com/camel-quickfix-RequestReplyExample-java- >io-IOException-tp5723769p5724048.html >Sent from the Camel - Users mailing list archive at Nabble.com.