axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sam Lang <>
Subject WSDL2Ws generated C bindings
Date Tue, 25 Nov 2003 16:52:59 GMT


I have a couple questions about the generated C bindings from WSDL2Ws.

For a simple example wsdl (Calculator), it looks like the Call *
variable is actually defined inside the generated header
(Calculator.h).  Defining global variables in headers
is a bad idea.  It leads to nasty stuff like 'already defined' errors
when two object files that include the same header are linked together.

Also, it looks like the Call handle is getting reinitialized at each
stub call (even though its currently a global variable).
If you really are just re-initializing at each call, then why not make
it a local variable?  If re-initializing is too expensive, perhaps add
an InitCallHandle function that returns the appropriate service handle,
and then pass it in to each of the stubs as the first parameter?  This
will make the generated bindings thread safe, instead of using a global
variable which will require locks to be thread safe.


View raw message