JAXWS端点的apachecxf-Spring Java配置

JAXWS端点的apachecxf-Spring Java配置,spring,cxf,Spring,Cxf,我正在尝试使用java配置(无XML配置)用ApacheCXF配置Spring,并想知道如何使用SpringJava配置注册JAXWS端点。例如,下面的XML配置的“java配置”等价物是什么 <jaxws:endpoint id="reportService" implementor="#reportServ" address="/reportService"/> 亲切问候,, Zahanghir与XML配置相当的“Java配置”类似: @Configuration publ

我正在尝试使用java配置(无XML配置)用ApacheCXF配置Spring,并想知道如何使用SpringJava配置注册JAXWS端点。例如,下面的XML配置的“java配置”等价物是什么

<jaxws:endpoint id="reportService" implementor="#reportServ" address="/reportService"/>

亲切问候,,
Zahanghir

与XML配置相当的“Java配置”类似:

@Configuration
public class CXFConfiguration {

   @Autowired
   private ReportService reportServ;

   @Bean
   public Endpoint endpoint() {
       Endpoint endpoint = new EndpointImpl(reportServ);
       endpoint.publish("/reportService");
       return endpoint;
   }

}

我希望这能对你有所帮助。^。

不幸的是,从我所能告诉你的情况来看,凯文霍尔的答案实际上不起作用。可以在姐妹线程()中找到有效答案