<!-- Introduction Cxf bean is defined as follows, using --> <import resource= "classpath:meta-inf/cxf/in earlier versions Cxf.xml " /> <!-- <import resource=" classpath:meta-inf/cxf/ Cxf-extension-soap.xml " /> --> <import resource=" classpath:META-INF/cxf/ Cxf-servlet.xml " /> <!-- Direct release of a class, no interface --> <jaxws:endpoint id=" one " implementor= "Com.hcm.service.OneService" address= "/one" > </jaxws:endpoint> <!-- Publish a service with no interface specified --> <jaxws:server id= "one" address= "/two" serviceclass= "Com.hcm.service.ITwoService" > <jaxws:inInterceptors> <bean class= "Org.apache.cxf.interceptor.LoggingInInterceptor" ></bean> </jaxws:ininterceptors> <jaxws:outinterceptors > <bean class= "Org.apache.cxf.interceptor.LoggingOutInterceptor" ></bean> </jaxws:outInterceptors> <jaxws:serviceBean> <!-- Specify the publication class, the following class must add @webservice annotation --> <bean class= " Com.hcm.service.impl.ITwoServiceImpl "></BEAN>&NBSP;&NBSP;</JAXWS:SERVICEBEAN>&NBSP;</JAXWS: Server>
<context-param> <param-name >contextconfiglocation</param-name> <param-value> / web-inf/cxf-servlet.xml </param-value> </context-param> <listener> <listener-class>org.springframework.web.context.contextloaderlistener </listener-class> </listener> <servlet> <servlet-name>cxf</servlet-name> <servlet-class> Org.apache.cxf.transport.servlet.cxfservlet</servlet-class> <load-on-startup>1 </load-on-startup> </servlet> <servlet-mapping> < servlet-name>cxf</servlet-name> <url-pattern>/ws/*</url-pattern> </servlet-mapping>
Cxfserver&cxfclient