powered by Jive Software

Getting bad-request(400) while sending pubsub node

Hell all,

i am getting “bad-request(400)” error while send pubsub node here is my code

// Create a pubsub manager using an existing Connection

PubSubManager mgr = new PubSubManager(connection);

// Create the node

ConfigureForm form = new ConfigureForm(FormType.submit);

form.setAccessModel(AccessModel.open);

form.setDeliverPayloads(true);

form.setNotifyRetract(true);

form.setPersistentItems(true);

form.setPublishModel(PublishModel.open);

LeafNode leaf =(LeafNode) mgr.createNode(“abc_1”, form);

leaf.send(new Item(“123abc”));

here is my error log.

bad-request(400)

at org.jivesoftware.smackx.pubsub.packet.SyncPacketSend.getReply(SyncPacketSend.ja va:53)

at org.jivesoftware.smackx.pubsub.packet.SyncPacketSend.getReply(SyncPacketSend.ja va:61)

at org.jivesoftware.smackx.pubsub.LeafNode.send(LeafNode.java:299)

at org.jivesoftware.smackx.pubsub.LeafNode.send(LeafNode.java:276)

Does the node already exist? This would be the case if you ran this more than once.