zoukankan      html  css  js  c++  java
  • CXF整合Spring配置文件

    <beans xmlns="http://www.springframework.org/schema/beans"
    	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxws="http://cxf.apache.org/jaxws"
    	xsi:schemaLocation="
    http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
    http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
    
    	<import resource="classpath:META-INF/cxf/cxf.xml" />
    	<import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
    	<import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
    
    	<!-- implementor指定webservice的服务提供者。支持两种形式:
    	    A.直接给定服务器提供者的类名,如果有依赖注入将会抛出异常 
    		B.设置为容器中一个Bean,要在Bean的id前加# -->
    	<bean id="userService" class="com.php.service.impl.UserServiceImpl" />
    	<bean id="helloWorld" class="com.php.ws.cxf.impl.HelloWorldImpl">
    		<property name="us" ref="userService" />
    	</bean>
    	<!-- 简单发布(没有接口的发布) -->
    <!-- 	<jaxws:endpoint implementor="#helloWorld" address="/HelloWorld">
    		<jaxws:outInterceptors>
    			<bean class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
    		</jaxws:outInterceptors>
    		<jaxws:inInterceptors>
    			<bean class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
    			<bean class="com.php.cxf.ws.auth.AuthInterceptor">
    				<constructor-arg index="0" value="Phase.PRE_INVOKE"/>
    			</bean>
    		</jaxws:inInterceptors>
    	</jaxws:endpoint> -->
    	<!-- 带接口的发布,serviceClass:接口类型  address:服务的请求url jaxws:serviceBean:实现类-->
    	<jaxws:server address="/HelloWorld" serviceClass="com.php.ws.cxf.HelloWorld">
    		<jaxws:serviceBean>
    			<ref bean="helloWorld"/>
    		</jaxws:serviceBean>
    		<jaxws:outInterceptors>
    			<bean class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
    		</jaxws:outInterceptors>
    		<jaxws:inInterceptors>
    			<bean class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
    			<bean class="com.php.cxf.ws.auth.AuthInterceptor">
    				<constructor-arg index="0" value="Phase.PRE_INVOKE"/>
    			</bean>
    		</jaxws:inInterceptors>
    	</jaxws:server>
    </beans>
    
  • 相关阅读:
    vb教程图文并茂
    一个文本框的andriod教程
    5月18日,完成导入数据,但是从命令行显示数据乱码,程序已经正常工作
    android 文件读写权限的设定
    raw目录的位置是D:android_projectsqrscanappsrcmain es aw
    一个在raw里面放着数据库文件的网上例子
    P1446 [HNOI2008]Cards [Burnside引理]
    UVA11255 Necklace [Polya定理]
    Polya 定理入门[Burnside引理,Polya定理,欧拉函数]
    P2831 愤怒的小鸟 [状压dp/模拟退火]
  • 原文地址:https://www.cnblogs.com/dapeng520/p/4622783.html
Copyright © 2011-2022 走看看