Hi Dave, hi all, I recently upgrade my generateDS from 2.19b to 2.24a. When using the newly generated API I noticed some incompatibilities with my existing application, namely some child elements(child1 or child2) defined under a parent(nonroot), which in turn is defined in an unbounded sequence here. The used schema is attached.
My actual problem now is, that I get list objects in the resulting api bindings for child1 and child2, although I would only expect the 'nonroot' element to be rendered as a list. If you remove the maxOccurs='unbounded' from the sequence above the 'nonroot' element in the example schema, child1 and child2 get rendered as single instance objects, as expected. From what I can tell this was also the behavior in version 2.19b. Is that change actually intended behavior or maybe some form of a bug/inconsistency? It seems especially weird to me as the 'suspect' element does not show that same behavior. Just let me know if somebody else experienced that problem or if I'm just using it wrong. Best Regards Florian
<?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" elementFormDefault="qualified" attributeFormDefault="unqualified" vc:minVersion="1.1"> <xs:element name="root"> <xs:annotation> <xs:documentation>Comment describing your root element</xs:documentation> </xs:annotation> <xs:complexType> <xs:sequence minOccurs="0" maxOccurs="unbounded"> <xs:element name="nonroot" minOccurs="0"> <xs:complexType> <xs:all> <xs:element name="child1" minOccurs="0"> <xs:complexType> <xs:sequence> <xs:element name="suspect" minOccurs="0"> <xs:complexType> <xs:attribute name="suspect_attribute" use="required"/> </xs:complexType> </xs:element> </xs:sequence> <xs:attribute name="child1_attribute"/> </xs:complexType> </xs:element> <xs:element name="child2" minOccurs="0"> <xs:complexType> <xs:attribute name="child2_attribute"/> </xs:complexType> </xs:element> </xs:all> <xs:attribute name="nonrootarg" use="required"/> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:schema>
apitest_instance.xml
Description: apitest_instance.xml
------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________ generateds-users mailing list generateds-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/generateds-users