Header Request
POST http://{URL} HTTP/1.1
Accept: */*
Accept-Language: en-us
Content-Type: text/xml; charset=UTF-8
Accept-Encoding: gzip, deflate
Content-Length: 1049
Connection: Keep-Alive
Pragma: no-cache
<?xml version="1.0"?>
<userID>dummy</userID>
<password>pwd</password>
I have the above request which is send to a ServletRequest in doFilter. I am able to read parameters by using servet apis as below
HttpServletRequest req = (HttpServletRequest) request;
Enumeration<String> params = req.getParameterNames();
How can I read the xml content inorder to retrieve UserID in that xml using servlet in Java