Spring/CXF WS controller

A web service is typically an application programming interface (API) or Web API that is accessed via Hypertext Transfer Protocol (HTTP) and executed on a remote system, hosting the requested service. The Spring Framework is an open source application framework for the Java platform. Apache CXF is an open-source, fully featured, easy to use Web Services framework. The goal is to correctly configure an MVC controller to communicate with a web service using Spring and Apache CXF.
1 answer

Spring/CXF WS controller: LaceyController

Declare a private field in your controller as the interface of the web service you want to communicate with, annotate the field as @Autowired, and call the desired methods on the field.
See attachment for details.
See Spring/CXF WS server config, Spring/CXF WS client config and Spring/CXF WS service for further details.