ArcGISs REST service + DOJO Servicestore issue

Discussion created by gmahase on Apr 22, 2010
I'm having an issue getting information from an ARCGIS REST service using a dojo service store. The store is created successfully, and I can query the search part of it from a custom .NET RPC Webservice. But when I try to do a query on an ESRI REST service it gives me an error.
The error I'm recieving is:
Unable to load <URL> status: 0

The URL is the correct URL that corresponds to a query layer REST service with the correct querystring parameters. Anyone have any experience with this?

SMD File


    services: {
        Search: {
     transport: "POST",
     envelope: "JSON-RPC-2.0",
     target: "/services/testRpc.ashx?rpc",
            parameters: [
                {name:"search", optional: false},
                {name:"start", optional: true},
                {name:"count", optional: true}
        query: {
     transport: "GET",
     envelope: "URL",
          target: "http://arcserver/ArcGIS/rest/services/Development/test/MapServer/0/query",
            parameters: [
    {name:"where", optional: false},
    {name:"returnGeometry", optional: false, "default":"true"},
    {name:"outFields", optional: false, "default":"loc_code"},
    {name:"f", optional: false, "default":"pjson"}


    constructor: function()
        svc = new dojox.rpc.Service("/SchoolRpc.smd");
        this.service =;
        this.idAttribute = "a";
        this.labelAttribute = "b";
    fetch: function(/* object */ request)
        console.log("myStore fetch");
        var rq = dojo.mixin({}, request.query);
  if (rq && (!rq.action || rq.action === "search"))
   this.service =; =;
   rq.start = request.start;
   rq.count = request.count;  
  else if (rq.action === "load")
   this.service = svc.query;
   rq.where = "id='" + + "'";
   rq.returnGeometry = "true";
   rq.outFields = "id";
   rq.f = "pjson";
   delete rq.action;
  request.query = rq; 
        return this.inherited(arguments);       
    _processResults: function(results, def)
        console.log("myStore _processResults",;       
        this._totalResults =
  return results;

JS Code for Fetching data

request = store.fetch({
                    query:{ action:"load",id:"29" }