}
xmlWriter.writeAttribute("to", to);
xmlWriter.writeAttribute("from", from);
// now lets write the features
Features features = new Features();
// TODO support TLS
// features.getAny().add(new Starttls());
//Mechanisms mechanisms = new Mechanisms();
// TODO support SASL
// mechanisms.getMechanism().add("DIGEST-MD5");
// mechanisms.getMechanism().add("PLAIN");
//features.getAny().add(mechanisms);
features.getAny().add(new ietf.params.xml.ns.xmpp_bind.ObjectFactory().createBind());
features.getAny().add(new ietf.params.xml.ns.xmpp_session.ObjectFactory().createSession(""));
marshall(features);
LOG.debug("Initial stream element sent!");
}