(C++)

Found 2 bugs with compiling autogenerated classes.


1. Function selection error

During compile of autogenerated file I've got the following error:
autogenerated_file.cpp:220: error: 'class axiscpp::IWrapperSoapDeSerializer' has no member named 'null'
autogenerated_file.cpp:223: error: 'null' was not declared in this scope

$ head -n 220 autogenerated_file.cpp | tail -n 1
        if ((ZIP = pIWSDZ->null( "ZIP",0)) != NULL)
where pIWSDZ is a pointer to instance of IWrapperSoapDeSerializer, passed as arg in autogenerated function.

It is right: there are no "null" method in IWrapperSoapDeSerializer:

$ grep -c null ../include/axis/IWrapperSoapDeSerializer.hpp
0


2. Misinterpreting of field type (looks like it is a reason of 1.)

The same autogenerated file, also ZIP.
original is an instance of autogenerated class.

Code
        if (original.ZIP != NULL)
        {
                ZIP = new autogenerated_class(*(original.ZIP));
        }
        else
        {
                ZIP = NULL;
        }
causes
same_autogenerated_file.cpp:309: warning: NULL used in arithmetic
same_autogenerated_file.cpp:311: error: invalid type argument of 'unary *'

It looks correct, because class of ZIP is defined as "xsd__int".

--
virtan / [email protected] / http://www.virtan.com

Reply via email to