10 RESTful web services
This chapter covers
- Understanding RESTful web services fundamentals
- Building RESTful web services with JAX-RS and Apache CXF
- Building RESTful web services with camel-restlet and camel-cxf components
- Using Camel’s Rest DSL
- Using Rest DSL with various Camel components
- Binding between POJOs and XML/JSON
- Documenting your RESTful services by using Swagger
- Browsing the Swagger API via the Swagger UI
For over a decade, web services have played an important role in integrating loose and disparate systems together. As a natural evolution of humankind and the IT industry, we learn and get smarter. Recently, RESTful web services (a.k.a. REST services) have taken over as the first choice for integrating services. This chapter covers a lot of ground about developing and using RESTful web services with Camel.
Section 10.1 covers the fundamentals and principles of RESTful services, so you’re ready to tackle the content of this chapter. We provide a lot of examples with source code that focus on a simple use-case that could happen in the real world, if Rider Auto Parts were an actual company. The section continues by explaining how to implement REST services using various REST frameworks and Camel components.
Section 10.2 introduces you to the Rest DSL, which allows you to define REST services the Camel way. You can use the natural verbs from REST together with the existing Camel routing DSL, combining both worlds.