camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Vila Lopez <>
Subject Simple and easy REST client with Camel
Date Sun, 26 Oct 2014 23:25:49 GMT

I have a very simple problem to solve but I've not been capable of sorting

Have one REST remote webservice from Marvel, and would like to create a
route that calls that webservice, gets the JSon response, and finally
prints out 3 of its attributes.

One told me the easiest approach would be to use an HTTP adapter and then a
json component.

This is what I have for now :

                        setBody(simple("my attributes are :

But in the setBody line I dont get anything.....

The structure of the JSON is like this :

  "code": "int",
  "status": "string",
  "data": {
    "offset": "int",
    "limit": "int",
    "total": "int",
    "results": [
        "id": "int",
        "digitalId": "int",
        "title": "string",
        "description": "string",
        "prices": [
            "type": "string",
            "price": "float"
        "thumbnail": {
          "path": "string",
          "extension": "string"
        } ] }

And I would like to get the values for "code", "data.results.title",
"data.results.prices.price", "data.results.thumbnail.path"

Any help ?

[image: Inline image 2]

* Jonathan Vila    ** <>

* <>*

  • Unnamed multipart/related (inline, None, 0 bytes)
View raw message