Reputation: 577
I'm trying to configure Spring with Apache CXF using java config (no XML config) and wanted to know how to register JAXWS endpoints using spring java config. For example, what would be the 'java config' equivalent for the XML config below?
<jaxws:endpoint id="reportService" implementor="#reportServ" address="/reportService"/>
Kind regards, Zahanghir
Upvotes: 4
Views: 5662
Reputation: 291
Unfortunately, from what I can tell KevinHol's answer doesn't actually work. A working answer can be found at the sister thread (Apache CXF + Spring Java config (no XML)).
Upvotes: 1
Reputation: 226
The 'Java-config' equivalent of your XML configuration is something like :
@Configuration
public class CXFConfiguration {
@Autowired
private ReportService reportServ;
@Bean
public Endpoint endpoint() {
Endpoint endpoint = new EndpointImpl(reportServ);
endpoint.publish("/reportService");
return endpoint;
}
}
I hope this can help you ^^.
Upvotes: 5