________________________________
From: Baker, Brad (Contr)
Sent: Monday, 07 March 2005 12:45
To: 'users_at_jwsdp.dev.java.net'
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 = it.next();
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:
com.sun.xml.rpc.server.http.HttpServletRequest
And I am trying to cast it to a:
javax.servlet.http.HttpServletRequest
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
implemented.
Where is the documentation on
com.sun.xml.rpc.server.http.HttpServletRequest?
Let me know if anyone has a solution!
Thanks,
Brad