XFireExporter 這種方式太繁瑣了,直接用 Java 5 annotation 或 commons-attributes 用起來(lái)舒服得多,只需要對(duì)服務(wù)接口做直接定義即可
/**
* Common Server Variables
*
* @@WebService(name = "ServerVariables", serviceName = "ServerVariables", targetNamespace = "
http://flier.yeah.net/")
* @@SOAPBinding(style = SOAPBindingAnnotation.STYLE_RPC)
*/
public interface ServerVariables
{
/**
* @@WebMethod(operationName = "GetMachineName", action="urn:GetMachineName")
* @@.return WebResult("machineName")
*/
string GetMachineName();
}
spring 中也僅需要增加對(duì)此 bean 得管理
<bean id="serverVariables" class="net.yeah.flier.ws.impl.ServerVariablesImpl" singleton="true">
所有的 dirty work 可以一次性配置進(jìn)去
詳細(xì)的說(shuō)明可以參考我的一篇文章
使用 xfire 快速發(fā)布 WebService
http://m.tkk7.com/flier/archive/2006/03/10/34730.html