axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Samisa Abeysinghe <samisa.abeysin...@gmail.com>
Subject Re: string return param from service
Date Tue, 11 Sep 2007 01:26:22 GMT
Vasile PAIS wrote:
> Hi Michael,  
> I encountered the same problem some time ago and I solved it by  dynamically 
> allocating the memory for the string variable, inside the  function:  char 
> *s=(char*)malloc(SIZE+1);  // Don't forget to add +1 
> for the final \0 character strcpy(s,"STRING");   I think this happens 
> because the "...._set_return" will just copy the  pointer address, which is 
> no longer available when you exit the function.  Hope this helps, 
>   
Should we fix the code to make a deep copy inside ...._set_retun 
function in generated code? I feel that we should. Thoughts please...

Samisa...

-- 
Samisa Abeysinghe - Apche Axis2/C
"http://ws.apache.org/axis2/c/?Apache&nbsp;Axis2/C&nbsp;The&nbsp;Web&nbsp;Services&nbsp;Engine"


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


Mime
View raw message