I am developing a web service using Glassfish using SOAP. I have several web methods, and I want to provide my web method name and its parameters for requesting an HTTP header.
For example:
I have this way:
context : WebServices
webMethod : makeSomething
Parameters : a = 2
So, I create a class called ProfilingFilter:
@Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws java.io.IOException, javax.servlet.ServletException { if (request.getContentLength() != -1 && context != null) { ((HttpServletResponse) response).addHeader("Operation", -->PATH+PARAMETERS); // ((HttpServletResponse) response).addHeader("Operation", -->makeSomething?a=2); } }
Can I use a servlet or servlet request to get this information?
If not, how to do it?
java web-services servlets webmethod
Goldbones
source share