ESB - Routes - Code

Seven Stars

ESB - Routes - Code

I am trying to understand the basics of Camel/ Routes. I have not been able to find any working example of a simple workflow for a simple RESTFul service:

GET Request
Reads headers
Saves Header from request into SqlServer DB
Fetches data from a SQLServer DB
Returns it to the client.

Can any one please point to a working example/ tutorial? I am lost here. Any help is appreciated

Eight Stars

Re: ESB - Routes - Code

Hello,

 

Have you also found this example?

http://edwardost.github.io/camel/rest/2013/10/14/Camel-REST-Proxy/

 

Is it what are you looking for?

 

Regards

lojdr

Seven Stars

Re: ESB - Routes - Code

@lojdr:
Thanks. This shows a rest proxy. I am trying to expose a Restful API using the Routes. Also, I could not find any details on connecting to a DB/ retrieve/ save values in Sql Server.

My aim is to simply be able to setup a RESTFul service via the Mediation perspective.

Thanks.
Eight Stars

Re: ESB - Routes - Code

Hello,

 

Here is another link how to build simple REST service.

https://help.talend.com/reader/Le3CQSmd8KQrsDxjrH8xCw/t0Dmfkg4yVYRj19mBr5n1Q

 

I am sorry. Without exact specification, this is maximum what I can do for you.

 

Regards

lojdr

Seven Stars

Re: ESB - Routes - Code

So, I have used the TrestRequest and created/ hosted a web service. It works wonders. However, I feel (based on all readings) routes may be a better way to go as it offers better control.

So, I am simply trying to learn/ create a RESTFul service using the Routes which can read some elements from the message headers, query data from Sqlserver DB, and send response back to the client.

@lojdr: hope this clarifies more.

Thanks