public void CreateItem(string project, string app, string resource, string format, Stream stream) { Response response = new Response(); try { format = "jsonld"; XElement xElement = _abstractPrivder.FormatIncomingMessage(stream, format); response = _abstractPrivder.Create(project, app, resource, format, new XDocument(xElement)); } catch (Exception e) { response.Level = StatusLevel.Error; response.Messages.Add(e.Message); } PrepareResponse(ref response); _abstractPrivder.FormatOutgoingMessage <Response>(response, format, false); }