1. #1
    Sencha User
    Join Date
    May 2011
    Location
    Bellevue, WA
    Posts
    5
    Vote Rating
    0
    puguasoft is on a distinguished road

      0  

    Default 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

  2. 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.

  3. #2
    Sencha User
    Join Date
    Nov 2011
    Posts
    53
    Vote Rating
    0
    Answers
    2
    paul_todd is on a distinguished road

      0  

    Default


    XMLWriter is still there as Ext.data.writer.Xml, look in <path to sencha>/sencha-touch-2-b1/src/data/writer/Xml.js

  4. #3
    Sencha User
    Join Date
    May 2011
    Location
    Bellevue, WA
    Posts
    5
    Vote Rating
    0
    puguasoft is on a distinguished road

      0  

    Default


    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

  5. #4
    Sencha User
    Join Date
    May 2011
    Location
    Bellevue, WA
    Posts
    5
    Vote Rating
    0
    puguasoft is on a distinguished road

      0  

    Default


    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. #5
    Sencha User
    Join Date
    Mar 2007
    Location
    Haarlem, Netherlands
    Posts
    1,243
    Vote Rating
    10
    Answers
    28
    TommyMaintz will become famous soon enough TommyMaintz will become famous soon enough

      0  

    Default


    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.

  7. #6
    Sencha User
    Join Date
    May 2011
    Location
    Bellevue, WA
    Posts
    5
    Vote Rating
    0
    puguasoft is on a distinguished road

      0  

    Default


    Great! Thanks, TommyMaintz!

    Looking forward to the next release. Keep up the great work!
    ~ Chris
    PugaSoft LLC

Thread Participants: 2

Tags for this Thread