You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Wesley Maness <wm...@graphlogic.com> on 2005/09/27 17:03:24 UTC

FW: fetch the HttpServletRequest object from client or server side

 

Hey, I have setup my Web Service running on the server below and everything
is working fine.  My question is that is there a way from the client side to
get the HttpServletRequest object either from the Call or Service objects?
I need this HttpServletRequest object.  Or, is it easier to grab this object
from the server side, and if so, how? (Is it as simple as modifying the
web.xml file to point to my listener-class, which would extend the
AxisHTTPSessionListener class?) 

 

We plan to use the HttpServletRequest object as a way to store our session,
and maintain our session for our Web Service.  Ideally, we would maintain
each session and tie that to a username and password, so that they could use
a webservice call to logon and then logoff.  

 

Thanks, 

 

Wesley C. Maness

Wmaness@graphlogic.com

 

 

CODE_BEGIN

 

import javax.xml.namespace.QName;

 

import org.apache.axis.client.Call;

import org.apache.axis.client.Service;

import org.apache.axis.session.Session;

 

public class OPGWSClientTest {

 

            public static void main(String[] args) throws Exception {

 

                        Service service = new Service();

                        Call call = (Call) service.createCall();

                        call.setTargetEndpointAddress(new java.net.URL(

 
"http://192.168.111.11:8081/dp/services"));

                        call.setOperationName(new
QName("urn:OPGServiceHandler", "getUserIds"));

                        

                        try {

                                    System.out.println(call.invoke(new
Object[] {}));

                        } catch (java.rmi.RemoteException re) {

                                    System.out.println("Error - " + re);

                        }

 

            }

 

}