Hi all,
I've looked for your problem. It's an issue related to the ";way"; facades are mapped.
I'll try to explain it as clear as possible...
Let's say a UMLClass with XmlSchema and ValueObject is poped out from repository and is entering to the mapping process.

Firstly, all namespace (xmlschema - cartridge) specific mappings are scanned.

None of them matches, because XMLComplexType need a Classifier and your class is a UMLClass (the name of metaclasses are compared)

Metafacades facades are then scanned. The UMLClass metaobject is wrapped to a ValueObject (because: metaclass name and stereotypes match).
However, if you remove ValueObject stereotype, no mapping is found.
The mapping process continue by determining the hierarchy of the metaobject. (here: Classifier -> ...)

The process described above restart, with the following element of the hierarchy (with Classifier).

XMLComplexType matches, and your class is wrapped to a XMLComplexType facade (and your schema is correctly generated).
This issue is not dependant on how you've lauched andromda (maven, maven 2, ant) neither on the model type (uml 1.4, uml2). It's simply an ";issue"; of the algorithm computing how facade are resolved.
A quick'n dirty fix would be to replace common based mapping of XMLComplexType to:
- Code: Select all
<metafacade class=";org.andromda.cartridges.xmlschema.metafacades.XSDComplexTypeLogicImpl";>
<mapping class=";org.omg.uml.foundation.core.UmlClass$Impl";>
<stereotype>XML_SCHEMA_TYPE</stereotype>
</mapping>
</metafacade>
<metafacade class=";org.andromda.cartridges.xmlschema.metafacades.XSDComplexTypeLogicImpl";>
<mapping class=";org.eclipse.uml2.impl.ClassImpl";>
<stereotype>XML_SCHEMA_TYPE</stereotype>
</mapping>
</metafacade>
This causes the mapping to be found at the first step. However, it solves the problem only for XMLSchemaType stereotype, and only for uml 1.4 and emf-uml2 metafacade. And it suppose that you don't put XMLSchemaType on Class only (and not other classifier like interface, enumeration, ...)