I have a Restful service which returning Product information while passing Product code.
The Interface will looks like
[OperationContract]
[WebInvoke(UriTemplate = "Product/{ProductCode}", Method = "GET", BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
Product GetProductInformation(String ProductCode);
I am accessing the service from the browser by entering the URI.
I am implementing log through spring AOP. How to intercept the method using Spring AOP. I have tried with NameMatchMethodPointcutAdvisor but i am not creating the service object using spring before accessing the service, it cant intercept. Is there any possible way to implement the logging for this ?
Finally I found the answer..
Helpful for someone..
The interception is possible by allowing the spring factory to create the service object. For that in the service host svc file add Factory attribute like this.
For preventing .net to create the service object in the web.config file under the
handlerspart in<system.webServer>remove the followingand adding