Author: ygrego Date: 2015-05-28 09:20:33 +0000 (Thu, 28 May 2015) New Revision: 1519 Url: http://forge.nuiton.org/projects/sandbox/repository/revisions/1519 Log: Modification of method "_createDocument", the xml document is transformed into json object. Modified: oipf/js/impl/OipfObjectFactory.js Modified: oipf/js/impl/OipfObjectFactory.js =================================================================== --- oipf/js/impl/OipfObjectFactory.js 2015-05-28 09:05:19 UTC (rev 1518) +++ oipf/js/impl/OipfObjectFactory.js 2015-05-28 09:20:33 UTC (rev 1519) @@ -14,7 +14,10 @@ this.xmlHttpRequest.send(); this.xmlHttpRequest.onload = function() { if(this.status == 200 && this.responseXML != null) { - self[callbackName].call(self, this.responseXML); + var xmlToJson = new XmlToJson(this.responseXML); + var jsonData = xmlToJson.getJson(); + + self[callbackName].call(self, jsonData); console.log("A new doument has been created."); } else { console.log("An error occured during the document creation."); @@ -26,7 +29,7 @@ init: function(modelFactory, dateUtils) { console.log("[INFO] constructor of OipfObjectFactory class called."); this._modelFactory = modelFactory; - this._oipfConfiguration = new OipfConfiguration(); + this._oipfConfiguration = new OipfConfiguration(); this.applicationManagerObject = new ApplicationManagerObject(); this.capabilitiesObject = new CapabilitiesObject(modelFactory); this._createDocument(