javaWeb服务详解【客户端调用】(含源代码,测试通过,注释) ——applicationContext.xml

<?xml version="1.0" encoding="UTF-8"?>
<beans
	xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:p="http://www.springframework.org/schema/p"
	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
	<!-- dept -->
	<bean id="clientFactory" class="org.apache.cxf.jaxws.JaxWsProxyFactoryBean">
		   <property name="serviceClass" value="org.service.IDeptService"></property>
		   <property name="address" value="http://localhost:8080/spring_clhop09_EmpService/services/getDepts?wsdl"></property>
  	</bean>
	<bean id="wsClient" class="org.service.IDeptService" factory-bean="clientFactory" factory-method="create"></bean>
	
	<!-- emp -->
	<bean id="clientFactoryEmp" class="org.apache.cxf.jaxws.JaxWsProxyFactoryBean">
		<property name="serviceClass" value="org.service.IEmpService"></property>
		<property name="address" value="http://localhost:8080/spring_clhop09_EmpService/services/getEmps?wsdl"></property>
	</bean>
	<bean id="wsClientEmp" class="org.service.IEmpServiceTest" factory-bean="clientFactoryEmp" factory-method="create"></bean>
</beans>

posted @ 2017-06-02 17:15  穆雄雄  阅读(142)  评论(0编辑  收藏  举报