Yeah, the problem was in the server's response: ASP.NET WebAPI doesn't
support Jsonp out of the box. So I've used a Jsonp  formatter
<https://github.com/WebApiContrib/WebApiContrib.Formatting.Jsonp>   and ALSO
changed the name of the callback method in qooxdoo jsonp store to
"callback", so now I'm getting such response:

callback({"Name":"Ian Moones","Address":["715 Lake Rdge Dr.","719 Lake Rdge
Dr."],"MobileNumber":"887-887 1234","Email":"moo...@gmail.com"});

What's also strange to me, is that if instead of such store declaration:

var store = new qx.data.store.Jsonp();
            store.setCallbackName("callback");
            store.setUrl(url);

I use this one:

var store = new qx.data.store.Jsonp(url, null, "callback");

the response is: 

qx.bom.request.Jsonp.qx1394023397662620.callback("Name":"Ian
Moones","Address":["715 Lake Rdge Dr.","719 Lake Rdge
Dr."],"MobileNumber":"887-887 1234","Email":"moo...@gmail.com"});

On the server side I'm using a simple class for the object I send in
response:

public class Profile
    {
        public string Name { get; set; }
        public ICollection<string> Address { get; set; }
        public string MobileNumber { get; set; }
        public string Email { get; set; }
    }

but on the qooxdoo side after getting the response I can't get any data.
this.debug(store.getModel());
gives me smth like this:

Address"Email"MobileNumber"Name[347-0] 

this.debug(this.getProfile().Name); shows nothing at all (undefined).

I  compared the response I get with the response in Tweets tutorial and
found out that in tweet's case the responsed object doesn't contain quotes
at the property's names like:

callback([
  {
    text: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam
nonumy eirmod tempor invidunt ut labore", 
    user: {profile_image_url :
"http://www.gravatar.com/avatar/7c366401a0b7a57c50e5c38913ddc135.png"},......

while my response have it.

may it be the case of the problem?

Thanks!



--
View this message in context: 
http://qooxdoo.678.n2.nabble.com/Jsonp-store-including-port-in-URL-is-not-allowed-tp7585414p7585418.html
Sent from the qooxdoo mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works. 
Faster operations. Version large binaries.  Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to