camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tomohisa Igarashi <tm.igara...@gmail.com>
Subject Re: How to invoking one rest webservice json response list property values to another rest webservice in one router.
Date Tue, 22 Nov 2016 03:24:20 GMT
Oops, I forgot to add doc links...

http://camel.apache.org/splitter.html
http://camel.apache.org/json.html
http://camel.apache.org/http.html
http://camel.apache.org/http4.html

On 11/22/2016 12:06 PM, Tomohisa Igarashi wrote:
> Like this?
>
> .to("http://localhost:8081/products/toDayDate=20161121")
> .unmarshal()
>     .json()
> .split(simple("${body.getProductList}"))
>     .setHeader(Exchange.HTTP_URI, simple("http://localhost:8081/price/${body.getProductId}"))
>     .to("http://dummy")
> .end();
>
>
> On 11/21/2016 06:30 PM, Gunjara wrote:
>>
>> How to invoking one rest webservice json response list property values to
>> another rest webservice in one router.
>>
>> example:
>> 1.Rest call
>>   localhost:8081/products/toDayDate=20161121 , it gives list of products
>>
>>     {
>>     "Id": "610",
>>     "Name": "15",
>>     "Description": "1.99",
>>     "ProductList": [
>>
>>               "product ID" ="1",
>>                "product ID" ="2",
>>               "product ID" ="3",
>>                    ]
>>  }
>>
>> based on the productId i need to invoke my second url
>>
>> localhost:8081/price/productId
>>
>> How to write this in a camel router in Best way.
>>
>>
>>
>>
>> --
>> View this message in context: http://camel.465427.n5.nabble.com/How-to-invoking-one-rest-webservice-json-response-list-property-values-to-another-rest-webservice-in-tp5790258.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>

Mime
View raw message