I am trying to put together a PubSub node hierarchy with Smack 3.3. The only methods I’ve found so far for this are the setChildren and getChildren methods of the ConfigurationForm class.It seems that the setChildren calls pass, but I don’t know how to (easily) check whether I achieved what I wanted. The real problem is caused by getChildren, which always throws a NullPointerException. The code goes like this:
Node parent = this.getChannel(parentId);
ConfigureForm fp = parent.getNodeConfiguration();
Iterator it = fp.getChildren();
In this case parent is an existing PubSub node which is successfully found by my local method. The last line throws the null exception.
My questions are:
Any clues what am I doing wrong?
Is this supported at all?
Should I create the PubSub node hierarchy in a different way?