Results 1 to 3 of 3

Thread: Load a Webservice response(XML-data) into an Ext Store

  1. #1
    Sencha User
    Join Date
    Jan 2012
    Posts
    2
    Vote Rating
    0
      0  

    Default Load a Webservice response(XML-data) into an Ext Store

    Hi,
    How can I load a Webservice response(XML-data) into an Ext Store to bind the Webservice response on Ext controls? It works well for file-based data sources. Here my examlpe:
    Code:
    Ext.define('modcar', {
        extend: 'Ext.data.Model',
        fields: [
               {name: 'id', mapping: '@ID'},
               {name: 'car', mapping: '@CAR'}
        ]
    });
    
    stocar = Ext.create('Ext.data.Store', {
        model: 'modcar',
        autoLoad: false,
        proxy: {
            type: 'ajax',
            url : cURL_APP_ROOT + 'js/lib/xml/cars.xml',
            reader: {
                type: 'xml',
                record: 'xy'
            }
        }
    });
    But it does not work, when I load a Webservice response in a "store" instead of a XML file .
    I tried to initialize the parameter "url" by a webservice-URL and not by theXML file. But without success.

    Thank you for your help

    Albert

  2. #2
    Sencha User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,166
    Answers
    3985
    Vote Rating
    1436
      0  

    Default

    Is the webservice on the same domain or cross domain?
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

  3. #3
    Sencha User
    Join Date
    Jan 2012
    Posts
    2
    Vote Rating
    0
      0  

    Default

    Sorry for late reply, i was on holidays :-). Its on the same domain.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •