Problem creating a node hierarchy

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>

This appears to be an issue with OpenFire, not Smack, as the correct information is being sent.

I will ask though, does the collection node you specify exist, and is the collection node being returned the root node of your server.

Thank you for your answer.

The collection node that is specified exists.

How can I know if the node returned is the root? It is one of the nodes in the PubSub service.