如何使用Fiddler调用ArcGIS休息服务?

时间:2016-08-24 14:47:13

标签: rest fiddler arcgis

我正在尝试使用Fiddler调用ArcGIS服务,但我似乎无法让它返回数据。

请求:

GET http://services1.arcgis.com/xxxxxxxxxxxx/ArcGIS/rest/services/WorldTimeZonesNamed/FeatureServer/query?layerDefs=0&geometryType=esriGeometryEnvelope&geometry= {xmin:-109.55,ymin:25.76,xmax:-109.55,ymax:25.76,spatialReference:{wkid:4326}}& f = json HTTP / 1.1 用户代理:Fiddler 主持人:services1.arcgis.com 内容长度:0

响应:

HTTP / 1.1 200好的 内容类型:text / plain;字符集= utf-8的 服务器:Microsoft-IIS / 8.5 X-ArcGIS-Instance:MTSDS_Web_IN_14 X-Powered-By:ASP.NET Access-Control-Allow-Origin:* 日期:2016年8月24日星期三格林尼治标准时间14:43:19 内容长度:98

{"错误" {"代码" 400"消息":"""细节&#34 ;:["不允许不带查询条件的操作。"]}}

我在这里做错了什么?

2 个答案:

答案 0 :(得分:1)

如错误消息所示,您需要发送where Clause参数以及请求。如果没有条件,那么您应该发送“1 = 1”作为您的标准。

答案 1 :(得分:0)

事实证明我需要指定应返回哪些输出字段(outFields = *)。我也可以使用点几何类型而不是信封,所以我可以发送一个坐标对而不是一个信封(矩形):

GET http://services1.arcgis.com/xxxxxxxxxxxx/ArcGIS/rest/services/WorldTimeZonesNamed/FeatureServer/0/query?geometry= {'x': - 55.748800,'y':48.758563}& geometryType = esriGeometryPoint& outFields = *& returnGeometry = false& f = json HTTP / 1.1 用户代理:Fiddler主持人:services1.arcgis.com内容长度:0