Apache CXF
Apache CXF is an open-source Java services framework governed by the Apache Software Foundation that helps build and develop web services using JAX-WS (SOAP) and JAX-RS (REST) frontend APIs. It supports contract-first (WSDL) and code-first development, full WS-* standards (WS-Security, WS-ReliableMessaging, WS-Addressing, WS-Policy), multiple transports (HTTP, JMS), and integrates with Spring Framework, OSGi/ServiceMix, and major Java EE servers.
APIs
Apache CXF
CXF provides Java APIs for building SOAP (JAX-WS) and REST (JAX-RS) web services with WSDL-first and code-first approaches, WS-* standards support, multiple data bindings (JAXB,...
Features
Full JAX-WS implementation for building contract-first and code-first SOAP web services with WSDL support.
Full JAX-RS implementation for building RESTful services with JSON and XML support and OpenAPI integration.
Comprehensive WS-Security support including XML Signature, XML Encryption, SAML tokens, Kerberos, and Username Tokens.
Supports HTTP, Servlet, JMS, In-VM, and local transports for flexible service deployment.
wsdl2java generates Java clients and server stubs from WSDL; java2ws generates WSDL and XSD from annotated Java classes.
Deep Spring Framework integration with Spring Boot starters for rapid JAX-WS and JAX-RS service development.
Supports JAXB 2.x, Aegis, XMLBeans, SDO, and JiBX data bindings for flexible XML/JSON marshalling.
Implements WS-Addressing, WS-ReliableMessaging, WS-Policy, WS-MetadataExchange, and MTOM for enterprise-grade SOAP.
Use Cases
Build and expose SOAP-based service-oriented architecture services in enterprise Java applications.
Create RESTful APIs with JAX-RS annotations, OpenAPI documentation, and JSON/XML serialization.
Wrap or migrate legacy SOAP/WSDL services to REST/JSON while maintaining backward compatibility.
Use CXF Spring Boot starters to quickly expose JAX-RS or JAX-WS services in microservice architectures.
Secure web services with SAML, Kerberos, PKI, or WS-Username Tokens using CXF WSS4J integration.
Integrations
CXF provides deep Spring integration including Spring Boot starters for JAX-WS and JAX-RS.
CXF runs as OSGi bundles in Apache Karaf for modular service deployment.
CXF services deploy as WAR files or embedded in Tomcat or Jetty servlet containers.
CXF uses WSS4J for WS-Security implementation including XML Signature and SAML.
CXF integrates with Swagger/OpenAPI for automatic API documentation of JAX-RS services.
CXF provides a Camel component for integrating web services into Camel routing and mediation flows.