How to send payload using JBosh?


I’m using JBosh in my project for a requirement. I’m establishing a connection by creating a BoshClient instance and rebuilding the ComposableBody with the data need to be sent to server. But, when I’m trying to send the rebuilt ComposableBody instance, I’m getting the below error:

Sample logic of my implementation is as follows:

*BOSHClientConfig cfg = *

  •        BOSHClientConfig.Builder.create(*
  •                new URI("[]("), "").setFrom("").build();*

BOSHClient client = BOSHClient.create(cfg);

ComposableBody cb = ComposableBody.builder().build();


String req2 = “Wherefore art thou, Romeo?”;

ComposableBody body2 = cb.rebuild().setPayloadXML(req2).build();

client.send(body2); // getting error here…

Could some one please help resolving the issue?


Jaya Krishna

What does this have to do with Smack, or any other ignite product for that matter?

Apologies rcollier, I’m afraid and not able to find proper forum for the same and hence, posted here if any of you have come across these issues.

Apologies again!