XMLStreamWriter xmlStreamWriter =
XMLOutputFactory.newInstance().createXMLStreamWriter(stream, Constants.DEFAULT_ENCODING);
xmlStreamWriter.setNamespaceContext(nsContext);
xmlStreamWriter.setDefaultNamespace("DAV:");
xmlStreamWriter.writeStartDocument();
xmlStreamWriter.writeStartElement("D", "prop", "DAV:");
xmlStreamWriter.writeNamespace("D", "DAV:");
HierarchicalProperty lockDiscovery = GenericResource.lockDiscovery(lockToken, lockOwner, timeOut);