HttpServletRequest error???

From: Baker, Brad \(Contr\) <"Baker,>
Date: Mon, 7 Mar 2005 11:59:44 -0800




From: Baker, Brad (Contr)
Sent: Monday, 07 March 2005 12:45
To: ''
Subject: HttpServletRequest


Hi all,


I am creating a Web Service with JWSDP 1.5 and I am trying to get to the
HttpServletRequest object.


This is what I have:

        messageContext = servletEndpointContext.getMessageContext();

        for(java.util.Iterator it = messageContext.getPropertyNames();
it.hasNext();) {

            Object obj =;

            String name = obj.toString();

            try {

                if (name.indexOf("HttpServletRequest") != -1) {

                    request = (HttpServletRequest) obj;


            } catch (ClassCastException ex) {

                // I get the Exception



When I look at the object name I get:



And I am trying to cast it to a:



Why? Well I am trying to do this generically so if we ever change
containers we are not hard coded to a specific implementation. It seems
like this would work if javax.servlet.http.HttpServletRequest is


Where is the documentation on


Let me know if anyone has a solution!