SALAM all.
please im trying to consume a WCF restful web service from sencha touch 1 from a while but without success.
the link to my web service is :
"http://localhost:8732/log/log/admin/pass/admin" this web service allow the authentication
and in my form i made this:
Code:
App.views.BankingLogin = Ext.extend(Ext.Panel, {
scroll: 'vertical',
items: [{
xtype: 'formpanel',
id: 'form',
fullscreen: true,
cls : 'form',
items: [
{
xtype: 'fieldset',
title: 'Sign In',
},
{
xtype: 'textfield',
id : 'Login',
label: 'Login*',
placeHolder: 'login',
},
{
xtype: 'passwordfield',
id: 'password',
label: 'Password*',
useClearIcon: true,
placeHolder: 'password',
},
{
xtype: 'panel',
defaults: {
xtype: 'button',
style: 'margin: 0.1em',
flex: 1
},
layout: {
type: 'hbox'
},
items: [{
text: 'Valider',
handler: function() {
if (Ext.getCmp('Login').getValue() == '') {
Ext.Msg.alert('Impossible de se connecte', 'Login vide');
}
if (Ext.getCmp('password').getValue() == '') {
Ext.Msg.alert('Impossible de se connecte', 'mot de passe vide');
}
if (Ext.getCmp('password').getValue() == '' && Ext.getCmp('Login').getValue() == '') {
Ext.Msg.alert('Impossible de se connecte', 'Login & mot de passe vide');
}
if (Ext.getCmp('password').getValue() != '' && Ext.getCmp('Login').getValue() != '')
{
Ext.util.JSONP.request({
url: 'http://localhost:8732/log',
params: {
log: admin,
pass: admin
},
callback: function(data) {
Ext.Msg.alert("Bienvenue ",data);
}
});
}
}
}]
},
]
}]
});
Ext.reg('BankingLogin', App.views.BankingLogin);
please have you any idea how can i correct my code ??? i want to make a cross mobile app, and i spent very much time searching how consuming a web service.
thank you