axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kopparapu, Sangeeta (GE Healthcare, consultant)" <>
Subject Help with memory exceptions while using stubs.
Date Thu, 15 Dec 2011 21:14:13 GMT


I need help in creating server side skeletons and client side stubs
using wsdl2c.


I have a 2 wsdl files importing an xsd schema with in it. 


I have generated skeletons and stubs using wsdl2c file. I copied both
wsdls together with .xsd file into a directory and I have executed the

Skeletons: -o <output_dir1> -f -uri app1.wsdl -u -ss -sd.

Stubs: -o <output_dir2> -f -uri app2.wsdl -u.


And each command created skeletons and stubs successfully in their
respective output directories. Now my questions are:


1.     Are the above commands correct? Because, in the generated file
list, I see 2 sets of requests and 2 files of responses for a SOAP
operation which is kind of confusing to me. Lets say, 

a.     for e.g, for Ping operation, the generated skeleton files are:
adb_pingRequestE10.c/h and adb_pingResponseE13.c/h

b.    for clearCache operation, the generated stubs are:
adb_ClearCacheRequest.c/h  adb_clearCacheRequestE0.c/h
adb_clearCacheRequestE0.c/h  adb_ClearCacheResponse.c/h

While implementing/invoking those operations which Request/Response
objects/types/variables should I use? 

2.     All the stub operations are in RequestE<n>.c/h (where n is
number) taking RequestE<n> as input and returning Response<n>as output.
So, in my application I followed the flow:

//Prepare request object (complex type) - Begin

a.     adb_ClearCacheRequest_t *pclearCacheRequest =

b.    adb_clearCacheRequestE0_t  *pClearcacheRequestE0 =

c.     status =
adb_clearCacheRequestE0_set_clearCacheRequest(pClearcacheRequestE0, env,

//Prepare request object (complex type) - End


d.    adb_clearCacheResponseE8_t *pclearCacheResponseE8 =
axis2_stub_op_DataExchangeService_clearCache( stub, env,

e.     adb_ClearCacheResponse_t *pClearCacheResponse =
adb_clearCacheResponseE8_get_clearCacheResponse( pclearCacheResponseE8,


// Free Request objects - Begin

f.     status = adb_ClearCacheRequest_free(pclearCacheRequest, env);

g.    //status = adb_clearCacheRequestE0_free(pClearcacheRequestE0,

// Free Request objects - End


With the above code, I noticed the below problems while debugging:

Problem # 1: If I don't use Step b, then Step d is returning NULL. 

Problem # 2: My understanding is, I have to free both the request
objects since I am creating both. So, if I have Step g uncommented, then
I am getting following exceptions:


*** glibc detected *** double free or corruption (fasttop):
0x00007ffff0036490 ***

======= Backtrace: =========








Problem # 3: But commenting Step g is not fixing this memory issue with
other Request objects of other SOAP operations. So, Is this the correct
way of creating request and response pair for stubs?

Problem # 4: Though commenting Step g, fixes the issue (sometimes), but
I would like to know the procedure to create request and response
objects in my scenario (wsdl with xsd) because, I am getting memory
exceptions in other functions too when I invoke other operations. 




Thanks & Regards, 

View raw message