首先引用 spring-net-reference文档中的话
Interface Requirements
In order to support some advanced usage scenarios, such as the ability to expose an AOP proxy asa web service (allowing the addition of AOP advices to web service methods), Spring.NET requires
those objects that need to be exported as web services to implement a (service) interface.
Web Services
Spring Framework (Version 1.3.2) 310
Only methods that belong to an interface will be exported by the WebServiceExporter.
这段话的意思是用 spring.net 发布成webservice的类必须实现某个接口,spring.net 会自动把这个接口的函数公布成webservice函数。
因为spring.net的大量使用面向接口的编程,而接口是不能序列化的,所以用接口声明的成员对象导致类不能发布成webservice,那么就要注意这些用接口形式声明的成员对象访问器不能包含在类所实现的接口中!