Spring是目前最流行的JavaEE Framework
Spring和XFire可以通過多種方式結合
在web
<servlet>
<servlet
<servlet
dehaus
</servlet
</servlet>
<servlet
<servlet
<url
</servlet
<servlet
<servlet
<url
</servlet
<context
<param
<param
classpath:org/codehaus/xfire/spring/xfire
/WEB
</param
</context
<listener>
<listener
org
</listener
</listener>
以下是完整的web
<?xml version=
<web
xmlns=//java/xml/ns/j
xmlns:xsi=
xsi:schemaLocation=
<context
<param
<param
classpath:org/codehaus/xfire/spring/xfire
/WEB
</param
</context
<listener>
<listener
org
</listener
</listener>
<servlet>
<servlet
<servlet
dehaus
</servlet
</servlet>
<servlet
<servlet
<url
</servlet
<servlet
<servlet
<url
</servlet
</web
定義接口
package soft;
publicinterface HelloWS {
public String sayHello(String sb);
}
實現服務
package soft;
publicclass HelloWSImp implements HelloWS {
public String sayHello(String sb) {
// TODO Auto
return
}
}
將上文中實現的服務
<?xml version=
<beans xmlns=
xmlns:xsi=
xsi:schemaLocation=
<bean id=
<bean name=
<property name=
<property name=
<property name=
<list>
<ref bean=
</list>
</property>
</bean>
<bean id=
AddressingInHandler
</beans>
From:http://tw.wingwit.com/Article/program/Java/ky/201311/28441.html