Am 13.12.12 17:39 schrieb "lawkai" unter <kai....@gmail.com>:

>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.


Reply via email to