spring客户端applicationContext.xml如下所示
<bean id="remoteServiceClass"
class="org.codehaus.xfire.spring.remoting.XFireClientFactoryBean">
<property name="serviceClass">
<value>ServiceClass</value>
</property>
<property name="url">
<value>http://xxxx/ServiceClass</value>
</property>
<property name="serviceFactory">
<ref bean="xfire.serviceFactory" />
</property>
<property name="lookupServiceOnStartup">
<value>false</value>
</property>
<property name="properties">
<props>
<prop key="http.timeout">15000</prop>
</props>
</property>
</bean>
客户端代码如下所示:
AbstractApplicationContext ac = new ClassPathXmlApplicationContext("classpath:applicationContext.xml");
ServiceClass serviceClass = (ServiceClass) ac.getBean("remotePaymentPartyFeeFacade");
Response response = serviceClass.getXXX(request);
非常方便