Enterprise Integration Zone is brought to you in partnership with:

Christian is a Principal Middleware Specialist/Architect at Red Hat specializing in developing enterprise software applications with an emphasis on software integration and messaging. His strengths include helping clients build software using industry best practices, Test Driven Design, ActiveMQ,Apache Camel, ServiceMix, Spring Framework, and most importantly, modeling complex domains so that they can be realized in software. He works primarily using Java and its many frameworks, but his favorite programming language is Python. He's in the midst of learning Scala and hopes to contribute to the Apache Apollo project. Christian is a DZone MVB and is not an employee of DZone and has posted 52 posts at DZone. You can read more from them at their website. View Full User Profile

Contract First Web Service Integration with Apache Camel on JBoss EAP

03.27.2014
| 4390 views |
  • submit to reddit

Apache Camel is the most popular open-source integration library. You can implement complex routing, orchestration, transformation, and mediation with this library. With hundreds of connectors/adapters including those to common enterprise backends (file, sftp, jms, web-service, business-rules) as well as cloud services (SalesForce, Gmail, JClouds, Amazon Web Services]) and social services like Twitter, Facebook, and Dropbox, it’s not difficult to see why it’s so popular. (see the out-of-the-box list at the Apache Camel website component list)

I think one of the biggest reasons why Camel is so popular is that it can run anywhere. It does not require or force you to use any specific container. You’re free to choose whatever deployment option you like and are comfortable… including J2EE containers (open source like JBoss Wildfly or commercial like JBoss EAP ), on OSGI containers (JBoss Fuse or Fabric8), or even without a container (yah… containerless.. the new fad.. just a Plain Old JVM).

In this quick video, I demonstrate some cool tooling around Camel provided by Red Hat to help you develop Camel integrations quickly. Though, the emphasis on this video isn’t the tooling per-se (I’ve go more blogs coming up on that), but rather on quickly creating a contract-first web service leveraging the awesome CXF and Camel projects and deploying onto a Java EE container, JBoss Enterprise Application Platform.

The keys here are using Maven Archetypes to quickly create the project, make some minor changes to connect camel and cxf to a servlet that can be deployed into a servlet container, then deploy to EAP. Note, the same strategy will work on Wildfly and Apache Tomcat (or the Red Hat hardened version of Tomcat, EWS).

If you have questions, let me know in the comments section. I use JBoss Developer Studio and the Fuse tooling from the Integration Stack in the video.

Published at DZone with permission of Christian Posta, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)