未捕获的TypeError:无法在sencha touch2外部webservice中调用未定义的方法'request'

Ram*_*ani 2 web-services sencha-touch

嗨,我是sencha touch2的新手.我必须使用外部Web服务.我在控制台中编写了如下代码,它给出了这样的错误Uncaught TypeError:无法调用未定义的方法'request'.有什么问题,请提供解决方案.谢谢

Ext.util.JSONP.request({
    url: 'http://localhost/SLS.BRND.Services/Service1.asmx/Helloworld',
    params: {
        method: 'Helloworld',
        format: 'json',
        callback: 'callback'
    },

    success: function(response) {
        alert('Working!')
        console.log(response);
    },
    failure: function(response) {
        alert('Not working!')
        console.log(response);
    }
});?
Run Code Online (Sandbox Code Playgroud)

Kri*_*lah 5

添加这个:

requires: ['Ext.data.JsonP'],
Run Code Online (Sandbox Code Playgroud)