I can reproduce this JDOM problem and my bypass is pretty ugly but it works…
If you create two lists (in your case), one of watchers and one of TupleIDs, then when you have finished adding watchers you can create a single list from both of these, and set the new combined list as the children of the parent node:
watchers.add(newwatcher);
List tupleIDs = instance.getChildren("tupleID");
watchers.addAll(watchers.size(),tupleIDs);
instance.setChildren(watchers);
This could get really nasty if the tree structure was more complex - does anyone know a better way?
#webMethods#API-Management#webMethods-Tamino-XML-Server-APIs