[xsd-users] Polymorphic problems.

Bill Pringlemeir bpringle at sympatico.ca
Tue Dec 2 21:09:06 EST 2008


On  2 Dec 2008, bpringle at sympatico.ca wrote:

> It (no_type_info exceptions) seems to happen with polymorphic
> customizations on AIX.  The same exception is not thrown on Linux.
> I will try to work on a test case; it is rather difficult as I don't
> understand the problem.  I believe that it is serializing a
> customized child.  The schema source lives in a seperate shared
> library and the executable creates the object and attempts to
> serialize it.  The no_type_info is only thrown on AIX.  It could
> also be with static initializers... although the routine is well
> into the main line...

I have just modified the polymorphism examples to 'wrap' the batman
class.  This seems to give the serialization error, on Linux even.
This is a similar setup.  Is some type_serialize/type_factory static
or extra methods in the wrapped class to support serialization.

I have this working reliably for a class where '--custom_type foo' is
used.  Ie, I created the complete class by myself; although, those are
simpleType.  When I put some debug in type-serialization-map.txx, the
type is '11batman_base'.

The custom implementation of batman_base seems to mix batman and
batman_base in the static initializers.  A larger system seems to make
this work on Linux.  Perhaps our classes have more conversion
operators that are allowing the compiler to match a template, etc.
But this doesn't work for XL C++.

Is the attached test case sufficient?  The make rules are not
completely correct.  It lives beside the polymorphism example in the
cxx/tree directory of xsd-3.2.0.

tia,
Bill Pringlemeir.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: polymorphism.tar.gz
Type: application/octet-stream
Size: 2565 bytes
Desc: test for wrapped children
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20081202/7a1a0e83/polymorphism.tar.obj


More information about the xsd-users mailing list