1. #1
    Ext JS Premium Member
    Join Date
    Feb 2012
    Posts
    27
    Vote Rating
    0
    crgrah is on a distinguished road

      0  

    Default Unanswered: ASAP: WCF service wrapper issues related to d: ?

    Unanswered: ASAP: WCF service wrapper issues related to d: ?


    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
    {
    • d: false
    }

    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
    Last edited by mitchellsimoens; 2 Apr 2012 at 7:33 AM. Reason: added [CODE] tags

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,801
    Answers
    3467
    Vote Rating
    834
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    You want to map your store to JSON that has a root of 'd'?
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Ext JS Premium Member
    Join Date
    Feb 2012
    Posts
    27
    Vote Rating
    0
    crgrah is on a distinguished road

      0  

    Default What do you mean? Is it not clear my question?

    What do you mean? Is it not clear my question?


    How do i do that? Show me code?

  4. #4
    Ext JS Premium Member
    Join Date
    Feb 2012
    Posts
    27
    Vote Rating
    0
    crgrah is on a distinguished road

      0  

    Default the answer is to set the rootproperty to d for anyone else with this issue

    the answer is to set the rootproperty to d for anyone else with this issue


    mark as answered

Thread Participants: 1

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi