https://github.com/cub0n/spring-cxf-endpoints
Example for autowiring many CXF endpoints automatically in Spring Boot
https://github.com/cub0n/spring-cxf-endpoints
apache-cxf autowiring cxf cxf-service endpoint soap soap-web-services soap-webservice spring-beans spring-boot springbean springboot
Last synced: 6 months ago
JSON representation
Example for autowiring many CXF endpoints automatically in Spring Boot
- Host: GitHub
- URL: https://github.com/cub0n/spring-cxf-endpoints
- Owner: Cub0n
- License: lgpl-2.1
- Created: 2024-12-07T19:39:37.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-12-08T09:06:23.000Z (10 months ago)
- Last Synced: 2025-04-06T02:14:46.481Z (6 months ago)
- Topics: apache-cxf, autowiring, cxf, cxf-service, endpoint, soap, soap-web-services, soap-webservice, spring-beans, spring-boot, springbean, springboot
- Language: Java
- Homepage:
- Size: 22.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE
Awesome Lists containing this project
README
Example for autowiring Apache CXF endpoints.
The implementation circumvents the problem if the service beans are registered too early.
_JaxWsServerFactoryBean_ does not initialize the underlying service bean properly if the registration is done via
_public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory)_ (so in Apache CXF Version 4.0.5)This means: The endpoint and the service beans are created or used, but the service beans have no other injected beans (Autowiring is not working).
Moreover: With the new paradigm to @Autowire Beans in the contructor, the service bean can not be initialized, because no appropriate Constructor was found and at startup an exception is thrown.
It seems that the beans or usage are done outside of the Spring Environment.So, the registration of the endoints is done in a later step with a @Configuration-bean.
Inspired from:
https://blog.mpesteban.dev/post/how-to-create-soap-services-with-spring-boot-apache-cxf