You have to explicity set the intention to maintain the session in the client too (is not enough the WSDL). To do that take your ServiceLocator (locator) and do locator.setMaintainSession(true);
Leo ----- Original Message ----- From: "Walid" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, October 31, 2003 1:49 PM Subject: Session problem. > > Hello, > > I generated my client and server bindings using WSDL2Java. > > I am trying to implements session in my WS but its not working, > each time I request a method, the server send me a different > sessionID : > > <soapenv:Header> > <ns1:sessionID soapenv:mustUnderstand="0" xsi:type="xsd:long" > xmlns:ns1="http://xml.apache.org/axis/session">-8606424956536496167</ns1:ses sionID> > </soapenv:Header> > > > and the client doesnt send the sessionID back. > I saw this using tcpmon. > > > I deployed the service setting the scope to Session. > > > I looked at the *SoapBindingStub.java generated and I cant figure out where the > client has to send the sessionID back, here is the code of one of my method : > > > public int push_group(java.lang.String in0) > throws java.rmi.RemoteException { > if (super.cachedEndpoint == null) { > throw new org.apache.axis.NoEndPointException(); > } > org.apache.axis.client.Call _call = createCall(); > _call.setOperation(_operations[4]); > _call.setUseSOAPAction(true); > _call.setSOAPActionURI(""); > _call.setSOAPVersion( > org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); > _call.setOperationName( > new javax.xml.namespace.QName( > "url:axis.unionlab.com", > "push_group")); > > setRequestHeaders(_call); > setAttachments(_call); > java.lang.Object _resp = _call.invoke(new java.lang.Object[] { in0 }); > > if (_resp instanceof java.rmi.RemoteException) { > throw (java.rmi.RemoteException) _resp; > } else { > extractAttachments(_call); > try { > return ((java.lang.Integer) _resp).intValue(); > } catch (java.lang.Exception _exception) { > return ( > ( > java > .lang > .Integer) org > .apache > .axis > .utils > .JavaUtils > .convert( > _resp, > int.class)) > .intValue(); > } > } > } > > > > Why is the org.apache.axis.client.Call _call = createCall(); > invoked for each method ? > > Thx a lot for your help... > > > -- > Walid > >