如何配置Spring.net Webservice成员属性?

时间:2011-10-26 00:18:30

标签: c# asp.net web-services asmx spring.net

我正在尝试设置类似于以下网址示例的Spring.net网络服务:

http://www.springframework.net/doc-latest/reference/html/springair.html

我对服务操作的成员属性有一些疑问。以下xml设置将属性注入操作:

<property name="MemberAttributes">
  <dictionary>
    <entry key="SuggestFlights">
      <object type="System.Web.Services.WebMethodAttribute, System.Web.Services">
        <property name="Description" value="Gets those flight suggestions that are applicable for the supplied trip."/>
      </object>
    </entry>
    <entry key="Book">
      <object type="System.Web.Services.WebMethodAttribute, System.Web.Services">
        <property name="Description" value="Goes ahead and actually books what up until this point has been a transient reservation."/>
      </object>
    </entry>
    <entry key="GetAirportList">
      <object type="System.Web.Services.WebMethodAttribute, System.Web.Services">
        <property name="Description" value="Return a collection of all those airports that can be used for the purposes of booking."/>
      </object>
    </entry>
  </dictionary>
</property>

我有2个问题。首先,是否可以在AopAlliance.Intercept拦截器中访问这些属性的值?例如,是否可以从拦截器中访问WebMethod属性的Description属性的值?可能在Invoke方法及其IMethodInvocation参数中。

其次,是否可以添加从System.Attribute派生的自定义属性,类似于上面概述的Web方法属性,并再次访问拦截器中属性的属性。

上述任何帮助都会很棒!

0 个答案:

没有答案