1 of 1 people found this helpful
in 10(could be already 9 not sure) we properly implemented alternatives & requires settings on attributes.
so take a look at your resource definition (xsd/xml has noting to do with it) and look at how you have attributes defined.
Looking at the code of your subsystem, I think you had the same problem all along as you weren't properly validating the model in "populateModel()" of your add handlers.
Now that default validation is added by server itself you see the problem exposed.
to use Attributes.<name-of-attribute>.validateAndSet(operation, model)
and you will see the problem exposed right away.
you can also remove switchyard/SwitchYardModuleAdd.java at master · jboss-switchyard/switchyard · GitHub all together as it is not needed. the second one takes care of everything.
where you have attribute identifier defined as not allowing null, aka making it required, which makes validation fail.
Thanks for your reply, I thought the validation is performed against xsd. I'll dig into those handler and subsystem writer.
OK, the problem is in a way we build the ModelNode - it actually put the identifier attribute into operation address but not as a top level attribute, therefore the validator never can find it. Adding it as a top level attribute as well made validator happy.