axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nicola Turri" <ntu...@selin.it>
Subject session problem with AXIS ?
Date Fri, 05 Mar 2004 17:00:34 GMT
I have the session problem with  AXIS versions 1.1 and tomcat 4.xxx
After one before demanded I have noticed that not  to maintain the sessions,
It generates always a new cockie.
How never happens this?

Thanks

this my example tipical code:

Client>>

 public Object Invoke(String serviceName,String allowedMethods,Object[]
params) throws Exception
  {
    Object resp=null;


    try {

      url = new URL(rpcRouterURL);
      service = new Service();
      Call call = (Call) service.createCall();
      call.setMaintainSession(true);
      call.getMaintainSession();
      call.getMessageContext();

      call.removeAllParameters();
      call.setTargetEndpointAddress(url);
      call.setOperationName( new QName(serviceName,allowedMethods) );


      for (int i=1; i<=params.length; i++)
        call.addParameter( "arg1", new QName(""), ParameterMode.IN );

      call.setReturnType(XMLType.QNAME_TEXT_SOAP12 );

      resp = call.invoke( params );

    }
    catch(Exception ex)
    {


      if (ex instanceof AxisFault) {
        if (!getResponse().equals("java.lang.NullPointerException"))
          throw new Exception(getResponse());
        else
          throw (AxisFault)ex;
      }

    }


    return resp;
  }

Server >>


      org.apache.axis.MessageContext mctx =
org.apache.axis.MessageContext.getCurrentContext();

      mctx.setTimeout(60000);

      ses =  mctx.getSession();

      ses.setTimeout(60000);

     // in order to recover after instance
      ses.get("myIstance");


Mime
View raw message