-
3 Feb 2012 3:12 PM #1
Answered: XmlWriter missing in 2.0 Beta 1
Answered: XmlWriter missing in 2.0 Beta 1
It seems like Sencha Touch has deprecated and removed Ext.data.XmlWriter in the latest 2.0 Beta release. That is very unfortunate as now our app is broken. We use to use XmlWriter when POSTING an XML document via a Model & Proxy (not using Ajax.request()). Without the XmlWriter, we can no longer do this. It seems like only JSON is supported now.
Is there any way to get around this? What is Sencha's future plans for handling POSTING XML within a Model & Proxy (i.e. not within an Ajax.request())???
If this isn't fixed in the final 2.0 version or if there are no work-arounds, I'm afraid we'll have to ditch Sencha Touch for JQuery Mobile.
P.S. - Yes, XML is going out of favor compared to JSON. However, we are using 3rd-party Web Services and, thus, are not able to simply make server-side changes to support JSON. I'm sure there are hundreds, if not thousands, of other people/companies in the same boat.
Thanks for any input!~ Chris
PugaSoft LLC
-
Best Answer Posted by TommyMaintz
Sorry guys, we forgot to add in the updated Xml Writer in the Beta 1 release. It will be back in beta 2, which you can expect very soon.
-
4 Feb 2012 6:01 AM #2
XMLWriter is still there as Ext.data.writer.Xml, look in <path to sencha>/sencha-touch-2-b1/src/data/writer/Xml.js
-
4 Feb 2012 11:13 AM #3
Thanks for your response, pual_todd.
I do see that the Xml.js is in the source, but it's missing in the docs (which might just be an oversight on the Sencha team and maybe they forgot to update the docs).
However, and more importantly, when specifying the writer type as 'xml', ST throws a string parser error. If I switch the type to 'json' or not specify one at all (which then defaults to json), everything runs fine.
So whether or not the Xml.js writer is actually included, it looks like it's no longer working when specifying the writer type as 'xml'.
Thanks for any other input.~ Chris
PugaSoft LLC
-
6 Feb 2012 11:22 AM #4
To be specific, this is the exception thrown when specifying a Proxy Writer of type "xml":
Code:Uncaught TypeError: Cannot call method 'substring' of undefined sencha-touch-all.js:15 Ext.ClassManager.parseNamespace sencha-touch-all.js:15 Ext.ClassManager.get sencha-touch-all.js:15 Ext.ClassManager.instantiate sencha-touch-all.js:15 Ext.ClassManager.instantiateByAlias sencha-touch-all.js:15 Ext.apply.factory sencha-touch-all.js:15 Ext.define.applyWriter sencha-touch-all.js:15 Ext.apply.generateSetter.j sencha-touch-all.js:15 b.implement.initConfig sencha-touch-all.js:15 Ext.define.initialize sencha-touch-all.js:15 Ext.define.constructor sencha-touch-all.js:15 b.implement.callParent sencha-touch-all.js:15 Ext.define.constructor sencha-touch-all.js:15 Ext.apply.create.f sencha-touch-all.js:15 (anonymous function) Ext.ClassManager.instantiate sencha-touch-all.js:15 Ext.ClassManager.instantiateByAlia ssencha-touch-all.js:15 Ext.apply.factory sencha-touch-all.js:15 Ext.define.applyProxy sencha-touch-all.js:15 Ext.apply.generateSetter.j sencha-touch-all.js:15 b.implement.initConfig sencha-touch-all.js:15 j.onBeforeCreated sencha-touch-all.js:15 b.(anonymous function) sencha-touch-all.js:15 Ext.apply.onBeforeCreated sencha-touch-all.js:15 j.onBeforeCreated sencha-touch-all.js:15 Ext.apply.require sencha-touch-all.js:15 (anonymous function) sencha-touch-all.js:15 j.onBeforeCreated sencha-touch-all.js:15 Ext.apply.process.h sencha-touch-all.js:15 Ext.apply.process.h sencha-touch-all.js:15 Ext.apply.process.h sencha-touch-all.js:15 a.registerPostprocessor.m sencha-touch-all.js:15 Ext.apply.require sencha-touch-all.js:15 (anonymous function) sencha-touch-all.js:15 Ext.apply.process.h sencha-touch-all.js:15 Ext.apply.process.h sencha-touch-all.js:15 Ext.apply.process sencha-touch-all.js:15 Ext.Class.b sencha-touch-all.js:15 Ext.ClassManager.create sencha-touch-all.js:15 Ext.apply.define sencha-touch-all.js:15
~ Chris
PugaSoft LLC
-
6 Feb 2012 2:37 PM #5Sencha - Sencha Touch Dev Team
- Join Date
- Mar 2007
- Location
- Haarlem, Netherlands
- Posts
- 1,235
- Vote Rating
- 5
- Answers
- 28
Sorry guys, we forgot to add in the updated Xml Writer in the Beta 1 release. It will be back in beta 2, which you can expect very soon.
-
6 Feb 2012 3:11 PM #6
Great! Thanks, TommyMaintz!
Looking forward to the next release. Keep up the great work!~ Chris
PugaSoft LLC


Reply With Quote
