我的評論
re: 接觸xfire Flier Lu 2006-03-10 23:05
XFireExporter 這種方式太繁瑣了,直接用 Java 5 annotation 或 commons-attributes 用起來舒服得多,只需要對服務接口做直接定義即可
/**
* 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 中也僅需要增加對此 bean 得管理
<bean id="serverVariables" class="net.yeah.flier.ws.impl.ServerVariablesImpl" singleton="true">
所有的 dirty work 可以一次性配置進去
詳細的說明可以參考我的一篇文章
使用 xfire 快速發布 WebService
http://www.aygfsteel.com/flier/archive/2006/03/10/34730.html
/**
* 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 中也僅需要增加對此 bean 得管理
<bean id="serverVariables" class="net.yeah.flier.ws.impl.ServerVariablesImpl" singleton="true">
所有的 dirty work 可以一次性配置進去
詳細的說明可以參考我的一篇文章
使用 xfire 快速發布 WebService
http://www.aygfsteel.com/flier/archive/2006/03/10/34730.html