2011-09-26 74 views
0

内部,我们有这样关于Spring和Apache CXF整合

<bean id="vincent" class="com.bayer.vincent.service.vincent"/> 

    <jaxws:endpoint 
     id="vincentSOAP" 
     implementor="#vincent" 
     implementorClass="com.bayer.vincent.service.vincent" 
     address="/vincent/soap" 
     bindingUri="http://schemas.xmlsoap.org/wsdl/soap/" /> 

这个认定中的这是什么意思applicationContext.xml文件?

我的问题是如何将vincent类称为?

回答

0

CXF提供了一个custom spring namespace以帮助您轻松地在此处配置Web服务端点。

如果实现者以#开头,CXF会假设它是endpoint is a Spring Bean,它是这种情况。

端点必须是一个正常的JAX-WS端点,即用@WebService注解,例如:

@WebService(serviceName="MemberService", endpointInterface="org.bk.memberservice.endpoint.MemberEndpoint", targetNamespace="http://bk.org/memberservice/") 

我们您的URI-/文森特/ SOAP任何呼叫,将会被重定向CXF前端控制器(您可以在web.xml文件中注册):

<servlet> 
    <servlet-name>CXFServlet</servlet-name> 
    <servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class> 
    <load-on-startup>1</load-on-startup> 
</servlet> 

它保持有效载荷的URI来处理内部注册表(在这种情况下的Spring bean),并适当地分配请求。

0

据我所知,创建代理类将所有调用转发给您的真实类。

另请参见Configuring an Endpoint其中描述了所有jaxws:endpoint属性。