code: private XMLStreamWriter startServiceDocument(ByteArrayOutputStream outputStream)
              throws XMLStreamException, ODataRenderException {
          XMLStreamWriter writer = XMLWriterUtil.startDocument(outputStream, null, SERVICE, ODATA_SERVICE_NS);
          writer.writeNamespace(ATOM, ATOM_NS);
          writer.writeNamespace(METADATA, ODATA_METADATA_NS);
          writer.writeNamespace(SERVICE_BASE, oDataUri.serviceRoot());
          writer.writeNamespace(ODATA_CONTEXT, getContextURL(oDataUri, entityDataModel));
  
          // WorkSpace element is only child of service document according to specifications.
          writer.writeStartElement(ODATA_SERVICE_NS, WORKSPACE);
          writeTitle(writer, getEntityContainer().getName());
  
          return writer;
      }
docs: Starts "service" document with correct attributes and also writes "workspace", "title" elements.
  
  @param outputStream stream to write to
  @return XMLStreamWriter to which writing happens
  @throws XMLStreamException   in case of errors
  @throws ODataRenderException in case of errors