Red Hat
Aug 18, 2015
by Christina Lin
This is the 5th part of my getting started demo for JBoss FUSE 6.2, an update from my old demo project.  For people that are getting started to know Fuse, and wants to get their hands dirty and develop a JBoss Fuse project.

There is a series of blogs/videos, you can find the previous post here:

The story behind the home loan demo is to prepare housing appraisals base on the content given real estate vendor. The appraisal needs to talk to local database, external google map API and also provide information through a web Restful API. We have divided this project into 4 independent integration applications, deploy in a distrusted environment, each handle single functions, and using message broker as the asynchronous medium to pass the message and data around.

First part of demo was to take in and process the information, first we separates the 2 kinds of files, because they are handled differently. And send it to separate messaging broker.
Second demo was about processing the customer data, by reading the xml file and store it into a existing database table.
Third part starts to process housing data by getting number of schools surrounding the house address via SAAS. Forth part does the actual housing value appraisal and store it into database.

Fifth demo, the vendors are asking for an service that provides all the data with the updated appraised house value back to them. And they are requesting if the information can be provided through a Restful Web service. It's a piece of cake for JBoss Fuse developer to expose an service via Web Service, we simply setup and configure the endpoints. Previously we need to state the interface with Java interfaces or classes, but with the latest new Rest DSL in Camel, we can simply set the endpoint through simple XML setting.


You will find detail instruction in the video.


In this demo,  you will learn:

Rest DSL to expose Restful Endpoint services, map the Restful service using Camel-Servlet. 
Allow end users to define REST services using a REST style, it builds Rest endpoints in Camel routes. But the actual REST transport is supported by components that has native REST integration

<rest path="/summaryservice">
    <get uri="/nationalID/{clientId}">
      <to uri="direct:customerSummary"/>
    </get>
</rest>

<restConfiguration component="servlet" contextPath="/homeloan" host="localhost" port="9999" bindingMode="json" >
  <dataFormatProperty key="prettyPrint" value="true"/>

</restConfiguration>

SQL Endpoint 
The sql: component allows you to work with databases using JDBC queries.

You can also find the source project in my github.
https://github.com/jbossdemocentral/jboss-fuse-homeloan


Original Post