<?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>
转载于:https://www.cnblogs.com/a1111/p/7459655.html