@Nonnull
    protected String createEmptyBody(final boolean terminate)
    {
        final Element body = DocumentHelper.createElement( QName.get( "body", "http://jabber.org/protocol/httpbind" ) );
        if (terminate) { body.addAttribute("type", "terminate"); }
        body.addAttribute("ack", String.valueOf(getLastAcknowledged()));
        return body.asXML();
    }
Creates an empty BOSH 'body' element, optionally including a 'terminate' type attribute (that, in BOSH,
signifies the end of a session). The element will include an 'ack' attribute, of which the value is the highest
request ID (rid) the server has received where it has also received all requests with lower request ID values.

@param terminate Whether to include a type attribute with value 'terminate'.
@return The string representation of an empty BOSH 'body' element.
xmppserver/src/main/java/org/jivesoftware/openfire/http/HttpSession.java