I'm trying to create a published service which reflects a customer XSD. I've noticed that Mendix has no contract-first option, so now I'm forced to create my own XSD which reflects the customer structure. The piece of XML I'm trying to generate is this: <PRODUCT> <PRODUCT_SPECIFICATION> <ZSMART_NetworkCapacityOrder1.0_event_1.0> I'm created an XSD that reflects this structure and imported in into Mendix. The result is this domain model (which looks ok I guess): Then I set the exposed items in the published web service: I've changed the exposed Item names to reflect the tag names I want To my surprise the WSDL mendix generates is this: It just duplicates the tag names. I'm trying to figure out if I'm doing something wrong or that Mendix is doing something strange. And whether or not it is a bug. Hopefully someone can help me figure out what is going on :) UPDATE: I think I've figured out the logic that Mendix applies. When an association is found between entities this will always result in a 'wrapper' element to contain the collection. But if the mapping is a 1-to-1 mapping this is weird behavior. Because a 1-to-1 mapping will never be a list and thus the extra tag to wrap the collection is unneeded overhead. So then I guess this is a bug?
In version 7.13 there is an option to prevent creating these association sublevels.
From the documentation:
To see the effect of this check box, consider a person with two dogs and a cat. When you do not select Include tags for associations, the XML looks like this: