You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by Franz Fehringer <fe...@isogmbh.de> on 2006/01/17 12:15:22 UTC

extra ampersand in serializexxx methods

Hello,

Both AxisC 1.5 and the upcoming 1.6 have issues with serializexxx methods in
generated code.
The point is that all data items are passed as void* (opaque pointers).
Therefore integer items get an ampersand & applied in front like
pSZ->serializeAsAttribute( "xsi:nil", 0, (void*)&(xsd_boolean_true),
XSD_BOOLEAN);
But string/char*/AxisChar* items are already pointers themselves, so no
ampersand should be applied:
pSZ->serializeAsAttribute("MatchType", 0, (void*)(param->MatchType),
XSD_NMTOKEN);
What can now observed with my example is that AxisC 1.5 does it wrong in two
places:
pSZ->serializeAsAttribute("MatchType", 0, (void*)&(param->MatchType),
XSD_NMTOKEN);
pSZ->serializeAsChardata((void*)&(param->t_OrgNameSearch_value),
XSD_STRING);
whereas AxisC 1.6 is right in the first and still wrong in the second case:
pSZ->serializeAsAttribute("MatchType", 0, (void*)(param->MatchType),
XSD_NMTOKEN);
pSZ->serializeAsChardata((void*)&(param->t_OrgNameSearch_value),
XSD_STRING);
Note that the attached generated sources are from AxisC 1.6.
AxisC 1.5 has other issues with the code in question (attributes of type
XSD_NMTOKEN are not serialized at all; members of structs already out of
scope are accessed), but these seem to be fixed with AxisC 1.6.
Is this issue already known and present in JIRA?

Greetings

Franz

Dr. Franz Fehringer (Dipl. Math.)
____________________________________
ISO Software Systeme
Eichendorffstrasse 29
90491 Nürnberg
Deutschland

Tel. : +49/(911) - 99594-0
Fax  : +49/(911) - 99594-580

mailto:feh@isogmbh.de
http://www.isogmbh.de