Hello,
I’m trying to use the Smack API to create nodes in a Open Fire Server.
I want to create a node hierarchy, and to acomplish thtat I used the Collection configuration. My code is the following:
PubSubManager mgr = new PubSubManager(connection);
ConfigureForm form = new ConfigureForm(FormType.submit);
form.setCollection(“testNode”);
//other configs
Node node = (Node) mgr.createNode(“prudteste”, form);
In the Debug window, I can see that the message was sent correctly. However, in the response of the server, the collection is always another one. Independently of what I put int the Colletion setting, the node is always a child of the node “anotherNode”.
Can you help me with this issue?
Message sent:
<create node="prudteste"/>
<configure>
<x xmlns="jabber:x:data" type="submit">
<field var="pubsub#collection" type="text-single">
<value>testNode</value>
</field>
(...)
</x>
</configure>
Response sent by the server:
<identity category="pubsub" name="null" type="leaf"/>
<x xmlns="jabber:x:data" type="result">
<field var="pubsub#collection" type="list-single">
<value>anotherNode</value>
</field>
(...)
</x>