How to create a listener/Tracer for my web services

222 views Asked by At

I have around 20 APIs up and running in my domain.

I need to create a listener in java for tracing all my request and response patterns including headers and store it in a DB.

If u have any suggestions or idea, please refer to me the same.

1

There are 1 answers

1
Juned Ahsan On

Use a Servlet Filter to map to generic URL pattern of your APIs. You can dump request and response headers in the doFilter method.

For your reading : http://www.oracle.com/technetwork/java/filters-137243.html