How to Log a RESTful Service using Spring AOP in ASP.Net -


i have restful service returning product information while passing product code. interface looks like

 [operationcontract]     [webinvoke(uritemplate = "product/{productcode}", method = "get", bodystyle = webmessagebodystyle.bare, requestformat = webmessageformat.json, responseformat = webmessageformat.json)]     product getproductinformation(string productcode); 

i accessing service browser entering uri.

i implementing log through spring aop. how intercept method using spring aop. have tried namematchmethodpointcutadvisor not creating service object using spring before accessing service, cant intercept. there possible way implement logging ?

finally found answer..

helpful someone..

the interception possible allowing spring factory create service object. in service host svc file add factory attribute this.

<%@ servicehost language="c#" debug="true" service="servicename" factory="spring.servicemodel.activation.servicehostfactory" %> 

for preventing .net create service object in web.config file under handlerspart in <system.webserver> remove following

<modules runallmanagedmodulesforallrequests="true"/> 

and adding

<remove name="webservicehandlerfactory-integrated"/> 

Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -