I have the following code call to a wcf service that works
Code:
var me = this;
Ext.Ajax.request({
headers: {
'Content-Type': 'application/json; charset=utf-8'
},
method: 'GET',
url: 'Service.svc/Login',
params: {
userName: Ext.ComponentQuery.query('#UserNameTextField')[0].getValue(),
passWord: Ext.ComponentQuery.query('#PasswordPasswordField')[0].getValue()
},
success: function (response) {
me.goToClientPage();
},
failure: function (response) {
var text = response.responseText;
Ext.Msg.alert('Failure', 'Password and/or Username are invalid values, ' + text);
}
});
the json response that it recognises is as follows
{}
however i have a store configured to retrieve data where all the values
returned are null,
Service.svc/GetClientsByUserID in the ajax proxy
the json returned is as follows
{- d:
[
{- __type: "FAC_Client:#DataContext",
- Archived: false,
- Country: "australia",
- DOB: "/Date(473346000000+1100)/",
- FAC_ClientID: 1,
- FAC_Relatives: [ ],
},
etc
.
.
I have read some code that references the d wrapper as follows:
Ext.Ajax.request( { url: 'ws/ServiceName.asmx/NotifyApprove', method: 'post', headers: { 'Content-Type': 'application/json;charset=utf-8' }, jsonData: jsonData, success: function(response, options) { response = eval('results = ' + response.responseText); var sequenceId = parseInt(response.d.SequenceId); //The response is wrapped in d //do something if you need }, failure: function(response, options) { response = eval('results = ' + response.responseText); } });
How do i remove the d wrapper from sencha touch 2 generated code?this is an urgent production issue..I would appreciate a working example.cheers