You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Walid <wa...@dbian.org> on 2003/10/31 20:25:35 UTC

Re: Session problem.

On Fri, Oct 31, 2003 at 02:03:51PM -0300, Leonardo Mena wrote:
> 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
> 


Hello Leo,

Thx for your answear.

Sorry i forget to mention that I did that too...
And I use the same locator, and I call that before calling my methods...

Any other idea ?

Thx

-- 
Walid








> ----- Original Message -----
> From: "Walid" <wa...@dbian.org>
> To: <ax...@ws.apache.org>
> 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
> >
> >