SALAM all.
i'm trying to consume restful web service made with .NET WCF here is a link to my web service
"http://localhost:8732/log/log/admin/pass/admin"
i'm using sencha touch to made a mobil cross app.
so i tryed to consume this web service with sencha touch1 but without success.
please have you some code ? and how can i call the Ext.util.jsonP in my form
here is my from:
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/log/admin/pass/admin',
success: function (resp) {
var data;
data = Ext.decode(resp.responseText);
if (data.success === true) {
Ext.MessageBox.alert('Message', data.msg);
} else {
Ext.MessageBox.alert('Error', 'Some problem occurred');
}
},
failure: function () {
Ext.MessageBox.alert('Error', 'Some problem occurred');
}
});
Ext.Msg.alert("Bienvenue ",App.views.BankingLoginrequest.data.msg );
Ext.redirect('Banking/compte');
window.location = redirect;
}
}
}]
},
]
}]
});
Ext.reg('BankingLogin', App.views.BankingLogin);
please how can i fix that ??
thank you