How to send payload using JBosh?

Hi,

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("[http://jwa.mydomain.com/httpbinding](http://jwa.mydomain.com/httpbinding)"), "example.com").setFrom("sampleuser1@example.com").build();*
    

BOSHClient client = BOSHClient.create(cfg);

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

client.send(cb);

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?

Thanks,

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!