cancel
Showing results for 
Search instead for 
Did you mean: 

"'$callback' is not a valid system query option" (JSON) while executing a OData.read operation....

Former Member
0 Kudos

Hi,

Im building an app en html5 that access a Gateway Service an consume a Data Model (already tested). I already have the app running and working with Eclipse (+Gateway Plugin) when executed in a J2EE server, the problem is when I try to run the app from other broswer diferent than IE (IE runs it fine) I get an HTTP request failed error, investigating it seems to be a problem of cross-domain http request so I found that a posible solution is to enable de JSON callback on de defaultHTTPClient for each OData operation as:

OData.defaultHttpClient.enableJsonpCallback = true;
OData.read(request, successCallback, displayError);

This solved the "http request failed" issue. The problem is that apparently Gateway does not permit the 'callback' implementation of the JSON (Correct me if I'm wrong), when tracing the http error with Google Developer Tools i get a 400 Bad Request status code, on the request method GET, the related URL is:

http://XXXXXXXXXX:XXXX/sap/opu/odata/sap/ZFLIGHTDLT/FlightCollection?$callback=parent.handleJSONP_0&...

Is this because Gatewaydoes not support JSON callbacks or other issue? Is there any configuration needed to be done on my Gateway side? Any ideas?

Thanks,

Andres de la Torre


Accepted Solutions (1)

Accepted Solutions (1)

former_member182048
Active Contributor
0 Kudos

Hi Andreas,

Gateway does not support JSONP.

JSP

Answers (0)