Skip to main content
Redhat Developers  Logo
  • Products

    Featured

    • Red Hat Enterprise Linux
      Red Hat Enterprise Linux Icon
    • Red Hat OpenShift AI
      Red Hat OpenShift AI
    • Red Hat Enterprise Linux AI
      Linux icon inside of a brain
    • Image mode for Red Hat Enterprise Linux
      RHEL image mode
    • Red Hat OpenShift
      Openshift icon
    • Red Hat Ansible Automation Platform
      Ansible icon
    • Red Hat Developer Hub
      Developer Hub
    • View All Red Hat Products
    • Linux

      • Red Hat Enterprise Linux
      • Image mode for Red Hat Enterprise Linux
      • Red Hat Universal Base Images (UBI)
    • Java runtimes & frameworks

      • JBoss Enterprise Application Platform
      • Red Hat build of OpenJDK
    • Kubernetes

      • Red Hat OpenShift
      • Microsoft Azure Red Hat OpenShift
      • Red Hat OpenShift Virtualization
      • Red Hat OpenShift Lightspeed
    • Integration & App Connectivity

      • Red Hat Build of Apache Camel
      • Red Hat Service Interconnect
      • Red Hat Connectivity Link
    • AI/ML

      • Red Hat OpenShift AI
      • Red Hat Enterprise Linux AI
    • Automation

      • Red Hat Ansible Automation Platform
      • Red Hat Ansible Lightspeed
    • Developer tools

      • Red Hat Trusted Software Supply Chain
      • Podman Desktop
      • Red Hat OpenShift Dev Spaces
    • Developer Sandbox

      Developer Sandbox
      Try Red Hat products and technologies without setup or configuration fees for 30 days with this shared Openshift and Kubernetes cluster.
    • Try at no cost
  • Technologies

    Featured

    • AI/ML
      AI/ML Icon
    • Linux
      Linux Icon
    • Kubernetes
      Cloud icon
    • Automation
      Automation Icon showing arrows moving in a circle around a gear
    • View All Technologies
    • Programming Languages & Frameworks

      • Java
      • Python
      • JavaScript
    • System Design & Architecture

      • Red Hat architecture and design patterns
      • Microservices
      • Event-Driven Architecture
      • Databases
    • Developer Productivity

      • Developer productivity
      • Developer Tools
      • GitOps
    • Secure Development & Architectures

      • Security
      • Secure coding
    • Platform Engineering

      • DevOps
      • DevSecOps
      • Ansible automation for applications and services
    • Automated Data Processing

      • AI/ML
      • Data Science
      • Apache Kafka on Kubernetes
      • View All Technologies
    • Start exploring in the Developer Sandbox for free

      sandbox graphic
      Try Red Hat's products and technologies without setup or configuration.
    • Try at no cost
  • Learn

    Featured

    • Kubernetes & Cloud Native
      Openshift icon
    • Linux
      Rhel icon
    • Automation
      Ansible cloud icon
    • Java
      Java icon
    • AI/ML
      AI/ML Icon
    • View All Learning Resources

    E-Books

    • GitOps Cookbook
    • Podman in Action
    • Kubernetes Operators
    • The Path to GitOps
    • View All E-books

    Cheat Sheets

    • Linux Commands
    • Bash Commands
    • Git
    • systemd Commands
    • View All Cheat Sheets

    Documentation

    • API Catalog
    • Product Documentation
    • Legacy Documentation
    • Red Hat Learning

      Learning image
      Boost your technical skills to expert-level with the help of interactive lessons offered by various Red Hat Learning programs.
    • Explore Red Hat Learning
  • Developer Sandbox

    Developer Sandbox

    • Access Red Hat’s products and technologies without setup or configuration, and start developing quicker than ever before with our new, no-cost sandbox environments.
    • Explore Developer Sandbox

    Featured Developer Sandbox activities

    • Get started with your Developer Sandbox
    • OpenShift virtualization and application modernization using the Developer Sandbox
    • Explore all Developer Sandbox activities

    Ready to start developing apps?

    • Try at no cost
  • Blog
  • Events
  • Videos

Jump start camel projects with the new yeoman-based project generator

January 7, 2019
Brian Fitzpatrick
Related topics:
Developer ToolsIDEs
Related products:
Red Hat Fuse

Share:

    The Red Hat Fuse Tooling team recently broadened its focus from a cross-platform, single-IDE (Eclipse) approach to a cross-platform, cross-IDE approach (Eclipse, VS Code, Che), starting several concerted efforts to provide tools that work across platforms and development environments. Supporting VS Code has become a priority that led us to explore using the Yeoman framework for project and file generation to provide developers a way to jump start their Fuse/Camel development efforts.

    This article describes the Yeoman framework and the new Yeoman-based Camel-Project generator the Fuse Tooling team created, and it shows how to install and run the generator.

    What is Yeoman?

    The Yeoman homepage describes the framework as “...a generic scaffolding system allowing the creation of any kind of app. It allows for rapidly getting started on new projects and streamlines the maintenance of existing projects.”

    • The framework provides an app-agnostic generator ecosystem that can be used to put together entire projects or just parts.
    • It is based on node.js and can be managed using the npm package manager.
    • Yeoman provides an extensive (and growing) array of "generators" available for Angular, Backbone, React, Polymer, and nearly 6,000 other projects.
    Learn more at yeoman.io
    Learn more at <a href="https://yeoman.io/" target="_blank">Yeoman.io</a>
    Learn more at

    Common use cases for Yeoman generators include:

    • Create a project
    • Create a new chunk of a project, like a unit test
    • Create a module or package
    • Bootstrap a new service
    • Enforce standards, best practices, and style guides in generated code
    • Gets users started quickly with sample apps

    It’s very easy to install Yeoman once you have NPM on a system:

    1. At a command prompt such as Cygwin or Git Bash on Windows or Terminal on Mac or Linux machines, type npm install yo (or npm install -g yo to install the package globally for all users, though this works only if you have admin privileges or by using sudo, if that is allowed).
    2. To install a specific Yeoman generator, type npm install generator-webapp (see above comment about -g!).
    3. And run it, type yo webapp.

    You can learn a great deal more at the Yeoman website and start developing your own generators.

    How did the Fuse Tooling team get involved?

    We started working with the Yeoman framework in the middle of 2018 to build a simple generator to help developers create new Camel projects from templates in a manner similar to using the New Project Wizard in the Eclipse-based Fuse Tooling. We've come a long way since then and now offer integration with the SOAP-to-REST functionality we previously explored with the Fuse Tools in Eclipse (see How to migrate your SOAP web service to REST with Camel).

    Though VS Code doesn't have the concept of a wizard, there are several examples where Yeoman was used to scaffold projects quickly. We decided to try the same approach for Camel projects.

    The new Yeoman-based Camel-Project generator scaffolds a new Camel project and gets it ready to run, setting up the necessary folder structure for Maven-ized Spring, Blueprint, or Java-based Camel development. Now, when you add wsdl2rest to the equation, you can add all the necessary CXF and Camel Rest DSL bits to that generated project to wrap your old WSDL-based JAX-WS service in a RESTful way.

    Installing and running the generator

    To run the generator, you must first install Yeoman, as described above.

    Then install the Camel-Project generator by typing npm install -g generator-camel-project. (See the previous notes about -g and constraints when installing globally.)

    Once the generator is installed, create a new directory, change to it, and run the generator:

    1. Type mkdir myproject.
    2. Type cd myproject.
    3. Type yo camel-project.

    A few notes about the generator:

    • You provide an application name (it defaults to the folder name), the Camel version (which defaults to 2.22.2), your Camel DSL type (spring, blueprint, or Java; it defaults to spring), and a package name (it defaults to com. + the project name).
    • If all is well, it creates a simple project based on the DSL-flavored template you provided.
    • To build and run the project after it's created, type mvn install and mvn camel:run (or combine them into one command like mvn install camel:run).

    Here is an example where I created a Spring-based project. The basic project I create logs a simple Hello message with a timer when it runs.

    Example of creating a Spring-based project

    We hope that this new generator will help users quickly get up to speed so they can do their own Camel development in any IDE where Yeoman is supported, and we plan on continuing to add functionality a little at a time.

    SOAP-to-REST support

    Our first chunk of new functionality for the generator focused on the wsd2rest tool we exposed in our Eclipse-based Fuse Tooling earlier in the year. By pairing the Camel-Project generator with wsdl2rest, users automatically gain a quick way to map some simple SOAP-based web services over to REST using Camel’s REST DSL.

    To activate the new functionality, simply add --wsdl2rest when you call the generator, for example, yo camel-project --wsdl2rest.

    There are a few new prompts, including the URL to the WSDL, the name of the output directory where the utility will put the generated CXF artifacts, the web address of the generated JAX-RS endpoint, and the web address of the source JAX-WS endpoint.

    For example, if I have a simple “Hello, world” service running locally, the process would look something like this:

    Simple “Hello, world” service running locally

    Once the Camel service is running locally, you can open your local browser to the URL localhost:8081/jaxrs/hello/"test" and you should see “Hello test” as a response. This demonstrates the Camel-provided REST service is running and accessing the SOAP service to return valid output.

    Verifying that the Camel-provided REST service is running

    The wsdl2rest utility provides support for basic types of WSDL implementations, but it does not include any of the WS-* extensions for security and so on. It is simply meant as a quick tool to help migrate simple JAX-WS services to a RESTful paradigm.

    The future

    If you like this tool, be sure to let us know! We’d love to hear what features you might want to see next as we continue to expand its capabilities.

    For more information about the Camel-Project generator, check out the NPMJS page.

    For more information about the wsdl2rest tool, check out its GitHub page.

    Also see the Red Hat Fuse page.

    Last updated: January 22, 2019

    Recent Posts

    • The benefits of auto-merging GitHub and GitLab repositories

    • Supercharging AI isolation: microVMs with RamaLama & libkrun

    • Simplify multi-VPC connectivity with amazon.aws 9.0.0

    • How HaProxy router settings affect middleware applications

    • Fly Eagle(3) fly: Faster inference with vLLM & speculative decoding

    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Products

    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform

    Build

    • Developer Sandbox
    • Developer Tools
    • Interactive Tutorials
    • API Catalog

    Quicklinks

    • Learning Resources
    • E-books
    • Cheat Sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site Status Dashboard
    • Report a security problem

    RED HAT DEVELOPER

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit
    © 2025 Red Hat

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility

    Report a website issue