I am trying to use Smack to publish an item with a payload to a pubsub node but I did not manage so far. I have created the node and set its configuration to deliver payload (setDeliverPayloads=true). I am using the send method to send the item with the payload.
node.send(new PayloadItem(this.clientNodeName+"*" + System.currentTimeMillis(), new SimplePayload("my book", "books:pubsub:simple", "")));
Nevertheless the item is published without the payload. The constructed IQ does not also have the payload. As I can see from the smack's debug panel
This is what is constructed by smack and sent to the pubsub service (clearly there is no payload)
<iq id="1ha20-11" to="pubsub.127.0.0.1" type="set">
<pubsub xmlns="http://jabber.org/protocol/pubsub">
<publish node="autoIncrement">
<item id="autoIncrement*1333380921970"/>
</publish>
</pubsub>
</iq>
I would appreciate any help to solve this issue. Of course I can still use native IQ messages but I will try to avoid this to utilize using the PubSubManager in the smack API as much as possible.