POST
|
The Geometry service's buffer operation, takes in an array of geometries. Refer to the REST API documentation at http://help.arcgis.com/EN/arcgisserver/10.0/apis/rest/buffer.html for more information. The Map Service query operation takes in a geometry object (as you can only specify one filter geometry at a time) and NOT an array of geometries (used for the Geometry service's buffer operation). For information on the Map Server's query operation look at http://help.arcgis.com/EN/arcgisserver/10.0/apis/rest/query.html for more information. You should be able to use the Silverlight API, which has C# bindings for ArcGIS server's REST API, as much of this work has already been done for you. Its got a very rich client API, that you can use.
... View more
10-04-2010
10:09 AM
|
0
|
0
|
557
|
POST
|
Nate, A couple of suggestions: 1. please check if the service is started (using ArcGIS Manager) and can be previewed. 2. Clear REST cache (http://servername:8399/arcgis/rest/admin or the rest/admin endpoint where REST is deployed) Nate, every-time you create a new service or make changes to an existing service. You must clear the REST cache.
... View more
09-03-2010
12:40 PM
|
0
|
0
|
674
|
POST
|
A GP service does not allow schema-less feature-sets. You can probably achieve the same using a RESTful Server Object Extension. This was true at 9.3.x. At 10.0 we have fixed this problem so as to allow the GP Service to take schema less feature sets.
... View more
09-03-2010
12:37 PM
|
0
|
0
|
246
|
POST
|
You have to be careful when you declarativily add widgets to your JavaScript application, as sometimes the dijit parser is a little slow in building DOM nodes, and therefore sometimes, the DOM node you look for may not be available. To solve this problem, you will need to do the following:
djConfig:"parseOnLoad:false"
dojo.require("dojo.parser");
dojo.addOnLoad(function() {
//the first thing you do should be to parse all widgets in the page. Only then continue
dojo.parser.parse();
//continue with esri.Map (etc.)
});
Hope this helps.
... View more
08-27-2010
01:51 AM
|
0
|
0
|
447
|
POST
|
A GP service does not allow schema-less feature-sets. You can probably achieve the same using a RESTful Server Object Extension.
... View more
08-27-2010
01:30 AM
|
0
|
0
|
246
|
POST
|
If all you care about is the distance, then you can get the coordinates of the points for which you need to measure distances; and pass them to the geometry service's "lengths" operation.
... View more
08-20-2010
04:02 PM
|
0
|
0
|
425
|
POST
|
Could you post the source code for the C# client that you are using to make the REST request ? The REST API does not make any distinction when handing requests. It treats all clients (Silverlight, JavaScript, Flex, iOS etc the same). It actually does not matter where the request is made from. If adding a point works in Flex, then you should use something like Fiddler, to make sure that the REST request you make to the server is identical to the one made by Flex.
... View more
08-15-2010
11:36 PM
|
0
|
0
|
276
|
POST
|
Looks like the REST handler is not being able to access that tile bundle for some reason. Can you check if there are files L18RXXXXCXXXX.bundle and L18RXXXXCXXXX.bundlx in your cache directory ? Could you also make sure that the creating the cache has completed successfully?
... View more
08-05-2010
04:51 PM
|
0
|
0
|
338
|
POST
|
REST at 10.0 has a cookie-less cache clear mechanism. All you need to do is to generate a token and call the clear cache operation with that token. That way you do not need to "log-in" and generate a cookie. For more information check out the REST API documentation. (http://help.arcgis.com/EN/arcgisserver/10.0/apis/rest/clearcache.html)
... View more
08-03-2010
09:47 AM
|
0
|
0
|
539
|
POST
|
What errors are you getting when you return null? When you set custom HTTP headers, you have to handle them by looking for custom HTTP headers yourself from the client code. If you want the application to return an error message, then it should be HTTP status 500 (internal server error | error processing request). All you need to do for that, is to throw an Exception with a message, and the REST handler will intercept the exception and treat it as a 500. So,
private byte[] GetImage(System.Collections.Specialized.NameValueCollection boundVariables,
ESRI.ArcGIS.SOESupport.JsonObject operationInput,
string outputFormat,
string requestProperties,
out string responseProperties)
{
try {
........
}catch(Exception e) {
//Log your exception and throw it so that the REST handler intercepts your exception
// and treats it as a HTTP 500.
throw e;
}
}
... View more
08-03-2010
09:45 AM
|
0
|
0
|
717
|
POST
|
If your SOE is in .NET you will have to construct the jsonified string yourself. Essentially it would be:
responseProperties = "{
\"Content-Type\" : \"image/png\",
\"X-HTTP-Status\" : \"500 - An error occurred while generating the image.\"
}";
... View more
07-30-2010
04:01 PM
|
0
|
0
|
717
|
POST
|
If there was a genuine exception, then you should just throw the appropriate exception. The REST handler intercepts the exception and sets the HTTP status to 500 (server error) with the appropriate exception message. If you want to set custom HTTP headers you can use 'responseProperties'. If your SOE is in Java, then all you need to do is:
JSONObject jobj = new JSONObject();
jobj.put("X-HTTP-Status", "500, An error occured when generating the image.");
responseProperties[0] = jobj.toString();
... View more
07-30-2010
03:57 PM
|
0
|
0
|
717
|
POST
|
Sending HTTP status codes can get tricky. If you are using a JavaScript client, for JSONP callbacks to work you MUST always send a status of 200. This is why REST API sends a status code of 200 even when your request failed, but adds the actual HTTP status in a error JSON object. You can choose to do the same. Otherwise you can set a custom HTTP header using responseProperties.
... View more
07-30-2010
10:20 AM
|
0
|
0
|
717
|
POST
|
This has already been baked into the JavaScript API. You can use an esri namespace method called "esri.request(...)" The full API reference documentation for the method is at : http://http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/namespace_esri.htm#request
esri.request({
url:"http://..../rest/services/USA/MapServer",
content: {
param1: "value1",
param2: "value2",
param3: "value3"
},
callbackParamName:"callback",
load:function(response, io) {
...
},
error:esriConfig.defaults.io.errorHandler
});
... View more
07-25-2010
10:57 AM
|
0
|
0
|
369
|
POST
|
The source for the image generation part looks correct to me. Can you set the content-type to something like "application/octet-stream", download the response from the SOE, save it as a PNG and open it in a Paint or something similar ? Another way that i think that you could solve this problem is, you can write a file to your arcgisoutput directory (virtual output directory) and return a URL to the image as JSON (text/plain).
... View more
07-22-2010
02:54 AM
|
0
|
0
|
1130
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|