Hi,
Thanks for your answer.
My problem is I don't really configure some file. I forgot to enable cookies 
with the simple line "#define WITH_COOKIES" of my stdsoap2.h
and that's all !


--- En date de : Ven 23.7.10, rabidcicada <rabidcic...@yahoo.com> a écrit :

De: rabidcicada <rabidcic...@yahoo.com>
Objet: [gsoap] Re: gsoap session
À: gsoap@yahoogroups.com
Date: Vendredi 23 juillet 2010, 15h04







 



  


    
      
      
      



--- In gsoap@yahoogroups.com, aurel aurel <aurel...@...> wrote:

>

> Hi all,

> 

> I have an gsoap C++ client with a Axis java server.

> 

> I just want to call the service and set a value. Then, I would like to

> get this value with an other call. But I can't do this, the retrieved

> value is allways null. How can I manage my sessions ?

> 

> 

> 

> This is a piece of code of my client :

> 

>     struct soap *soap = soap_new2(SOAP_IO_KEEPALIVE,SOAP_IO_KEEPALIVE);

> 

>     soap_init(soap);

> 

>     soap_call_ns1__setValue(soap, 

> 

>                               server  , 

> 

>                               NULL  , 

> 

>                               in    , 

> 

>                               out

> 

>                              );

> 

>     soap_call_ns1__getValue(soap, 

> 

>                               server  , 

> 

>                               NULL  , 

> 

>                               out2 

> 

>                              );

> 

>     soap_destroy(soap); 

> 

>     soap_end(soap); 

> 

>     soap_done(soap); 

> 

> 

> 

> At the 2nd call (getValue), my function don't remember the value I just set 
> before.

> 

> My problem is really simple but i'm in difficulty, is anybody can help me ?

> 

> Thanks,

> 

> Aurelie

>



Your client code looks correct.  Make sure the server code is actually saving 
the variable annd giving it back to you in out2.  



I'd guess that you've accidentaly coded your Axis server to "save"  the 'in' 
var from setValue() into a local variable (which leaves scope when the function 
ends).  You need to store it somewhere like a global variable or other 
persistent variable storage then reference the global in getValue().  If the 
server code correctly stores the variable then the problem is probably 
somewhere else in the server code to deal with retrieving the 
variable...assuming you parsed the same WSDL using gSOAP and you don't have 
SOAP protocol incompatibility problems.





    
     

    
    


 



  






      

Reply via email to