axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vasile Pais <>
Subject Re: string return param from service
Date Tue, 11 Sep 2007 06:07:08 GMT
Hi Samisa,

I definitely feel that this should be solved from inside the generated 

A problem with my solution is that I don't know when I should free the 
allocated buffer. (Perhaps it is freed by axis?) So far, I've tried to 
avoid using this solution, just to stay out of memory loss issues....


Samisa Abeysinghe wrote:
> 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...

Prezentul mesaj si orice fisier atasat constituie informatie confidentiala si este proprietatea
exclusiva a INFLPR. Mesajul se adreseaza numai persoanei fizice sau juridice mentionata ca
destinatara, precum si persoanelor autorizate sa-l primeasca. In cazul in care nu sunteti
destinatarul vizat sau persoana autorizata sa primiti acest mesaj , va aducem la cunostinta
ca dezvaluirea, copierea, distribuirea sau initierea unor actiuni pe baza prezentei informatii
sunt strict interzise si atrag raspunderea dvs. civila si penala. Daca ati primit acest mesaj
dintr-o eroare, va rugam sa ne anuntati imediat si sa-l stergeti apoi din sistemul dvs. Nu
putem garanta ca transmisia acestui mesaj este securizata sau fara erori. 

This message and any files or documents attached are classified as INFLPR confidential and
Proprietary Information. It is intended only for the individual or entity named and others
authorized to receive it. If you are not the intended recipient or authorized to receive it,
you are hereby notified that any disclosure, copying, distribution or taking any action in
reliance on the contents of this information is strictly prohibited and may be unlawful. If
you have received this communication in error, please notify us immediately then delete it
from your system.Please also note that transmission cannot be guaranteed to be secure or error-free.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message