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
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 ^^.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With