EJS
11-29-2006, 09:43 PM
Hi All,
I couldn't find an answer to this question: I have a webservice using the WebServiceExporter. The target is an (ordinary) service that implements a service interface. Now I want to apply an AOP advice to methods of this service. I configured this as follows:
<object name="ljnResearchPane" type="EJSSD.LjnResearchPane.Core.LjnResearchService, EJSSD.LjnResearchPane.Core">
<property name="..." ref="..." />
</object>
<object id="researchServiceLoggingAroundAdvice" type="Spring.AOP.Support.NameMatchMethodPointcutAdvisor, Spring.AOP">
<property name="MappedNames" value="Register,Query"/>
<property name="Advice">
<object type="EJSSD.OfficeResearchService.AOP.ResearchServiceLog gingAdvice, EJSSD.OfficeResearchService"/>
</property>
</object>
<object id="ljnResearchPaneProxied" type="Spring.Aop.Framework.ProxyFactoryObject, Spring.Aop">
<property name="Target" ref="ljnResearchPane" />
<property name="InterceptorNames">
<list>
<value>researchServiceLoggingAroundAdvice</value>
</list>
</property>
</object>
<object id="ljnResearchPaneWebService" type="Spring.Web.Services.WebServiceExporter, Spring.Web">
<property name="TargetName" value="ljnResearchPaneProxied"/>
<property name="Name" value="Research Pane"/>
<property name="Namespace" value="urn:Microsoft.Search"/>
<property name="Description" value="LJN Service Research Pane"/>
<property name="MemberAttributes">
<dictionary>
... methods
</dictionary>
</property>
</object>
This config gives the following exception:
Both Void AddAdvice(Int32, AopAlliance.Aop.IAdvice) and Void AddAdvice(AopAlliance.Aop.IAdvice) use the message name 'AddAdvice'. Use the MessageName property of the WebMethod custom attribute to specify unique message names for the methods.
The none proxied version works fine. I couldn't figure out why this error occurs...:confused:
Cheers,
EJ
I couldn't find an answer to this question: I have a webservice using the WebServiceExporter. The target is an (ordinary) service that implements a service interface. Now I want to apply an AOP advice to methods of this service. I configured this as follows:
<object name="ljnResearchPane" type="EJSSD.LjnResearchPane.Core.LjnResearchService, EJSSD.LjnResearchPane.Core">
<property name="..." ref="..." />
</object>
<object id="researchServiceLoggingAroundAdvice" type="Spring.AOP.Support.NameMatchMethodPointcutAdvisor, Spring.AOP">
<property name="MappedNames" value="Register,Query"/>
<property name="Advice">
<object type="EJSSD.OfficeResearchService.AOP.ResearchServiceLog gingAdvice, EJSSD.OfficeResearchService"/>
</property>
</object>
<object id="ljnResearchPaneProxied" type="Spring.Aop.Framework.ProxyFactoryObject, Spring.Aop">
<property name="Target" ref="ljnResearchPane" />
<property name="InterceptorNames">
<list>
<value>researchServiceLoggingAroundAdvice</value>
</list>
</property>
</object>
<object id="ljnResearchPaneWebService" type="Spring.Web.Services.WebServiceExporter, Spring.Web">
<property name="TargetName" value="ljnResearchPaneProxied"/>
<property name="Name" value="Research Pane"/>
<property name="Namespace" value="urn:Microsoft.Search"/>
<property name="Description" value="LJN Service Research Pane"/>
<property name="MemberAttributes">
<dictionary>
... methods
</dictionary>
</property>
</object>
This config gives the following exception:
Both Void AddAdvice(Int32, AopAlliance.Aop.IAdvice) and Void AddAdvice(AopAlliance.Aop.IAdvice) use the message name 'AddAdvice'. Use the MessageName property of the WebMethod custom attribute to specify unique message names for the methods.
The none proxied version works fine. I couldn't figure out why this error occurs...:confused:
Cheers,
EJ