private static String getRequiredAttribute(
            final AbstractBody body,
            final BodyQName name)
    throws BOSHException {
        String attrStr = body.getAttribute(name);
        if (attrStr == null) {
            throw(new BOSHException(
                    "Connection Manager session creation response did not "
                    + "include required '" + name.getLocalPart()
                    + "' attribute"));
        }
        return attrStr;
    }