1. #1
    Touch Premium Member
    Join Date
    Jan 2012
    Location
    Houston, Texas
    Posts
    96
    Vote Rating
    1
    baushaug is on a distinguished road

      0  

    Default Problem with "Load Data" for JSon Store from .NET web service. Problem #2

    Problem with "Load Data" for JSon Store from .NET web service. Problem #2


    I'm receiving an error when I attempt to "load data" from a .NET web service:

    It seems that the Designer is truncating my rootProperty "d" and the first itemTpl key value.

    Does anyone know what is going on here ?

  2. #2
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,369
    Vote Rating
    128
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    Paste the full response into jsonlint.com

    Does it validate?
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  3. #3
    Touch Premium Member
    Join Date
    Jan 2012
    Location
    Houston, Texas
    Posts
    96
    Vote Rating
    1
    baushaug is on a distinguished road

      0  

    Default


    What's up Aaron.

    Correction: Sorry I misunderstood your question.

    No the JSON response as interpreted by the store does not validate. Basically what's happening is it's ripping the first key off entirely.

    Although, I performed a 2nd test as I showed yesterday and explicitly invoked the AJAX request and set JSON response to the value of a textarea and that response string did validate. This tells me that my .NET web service method is sending valid JSON and the problem is w/ the Designer/Store's interpretation.



    I also just noticed something that looks kinda buggy.

    When I hard code this valid response string into the data: config on my store and save. When i look at the actual file the quotes are missing around the first key but are present around all subsequent keys like so.



    Guess what this doesn't validate on jsonlint.com.
    Last edited by baushaug; 1 Mar 2012 at 7:01 AM. Reason: corrected my response

  4. #4
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,369
    Vote Rating
    128
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    What happens in the browser? Outside of designer
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  5. #5
    Touch Premium Member
    Join Date
    Jan 2012
    Location
    Houston, Texas
    Posts
    96
    Vote Rating
    1
    baushaug is on a distinguished road

      0  

    Default


    Aaron are you referring to if I access the web service directly and invoke the method that way ?

    If so I get a successful execution of the web service method and the browser renders a response in valid XML.

    I'm getting this error for all methods referenced by the Designer on this web service. Here is the url for the particular error message at hand :

  6. #6
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,369
    Vote Rating
    128
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    Whats converting the xml to JSON?
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  7. #7
    Touch Premium Member
    Join Date
    Jan 2012
    Location
    Houston, Texas
    Posts
    96
    Vote Rating
    1
    baushaug is on a distinguished road

      0  

    Default


    Sorry I confused you there with the XML, JSON back and forth. The problem has been identified and here is what we've discovered.


    After an hour and 20 minutes troubleshooting this with my manager, we have found out that the Sencha Designer 2 doesn't like rootProperty "d" that is specific to Microsoft.NET's web service JSON response. So this is a snippet of the actual string being returned from the web service:



    It gives this error and for some reason removes the first key only starting with the value:

    So we created a custom string without the proprietary Microsoft.NET "d" rootProperty and we were able to successfully "load data" to our store in Sencha Designer 2.

    Hopefully this will help someone in the future and hopefully you guys can accommodate the .NET "d" rootProperty in future releases of the Sencha Designer 2.

    Thanks for the response.

  8. #8
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,369
    Vote Rating
    128
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    Boggled, but will take a look.
    Aaron Conran
    @aconran
    Sencha Architect Development Team

Thread Participants: 1