100.0.0 version QueryFeaturesAsync problem

1266
0
02-08-2017 01:58 AM
NirShafrir
New Contributor

Hi
I'm trying to query a feature service and encountered this weird problem (bug?).
I created a ServiceFeatureTable object using my feature service as the source.

When querying the service using the QueryFeaturesAsync with a point or a simple polygon the query works great,
but when I try querying with a polygon I created using the GeometryEngine.BufferGeodesic function the query
fails with this exception:
"System.Net.Http.HttpRequestException occurred
Message: A first chance exception of type 'System.Net.Http.HttpRequestException' occurred in System.Net.Http.dll
Additional information: Response status code does not indicate success: 404 (Not Found)."

This polygon is a circle, created by buffering a map point by 1000 meters, it has 1 part and 74 points.
By watching the network traffic with Fiddler I realized the query if preformed using the GET method and the reason for the exception is that it exceeds the GET method
length limitation.
This is the request URL created for the query -
"GET /arcgis/rest/services/StationsAndPolygons/MapServer/0/query?f=json&geometry={"rings":[[[34.885552625303909,32.103815339520231],
[34.886451121163176,32.10378284867901],[34.887343141442116,32.103685610320348],[34.8882222572717,32.103524325250085],
[34.889082132867379,32.103300155859856],[34.889916571228525,32.103014717742475],[34.890719558833311,32.102670068038762],
[34.891485309005837,32.102268690599843],[34.892208303641837,32.101813478072422],[34.892883332991389,32.101307711036789],
[34.893505533211282,32.100755034348062],[34.89407042141606,32.100159430852202],[34.894573927974925,32.099525192666555],
[34.895012425821989,32.098856890232554],[34.895382756568843,32.098159339364294],[34.895682253232096,32.097437566530928],
[34.895908759412833,32.096696772623602],[34.896060644790836,32.095942295468511],[34.896136816823308,32.095179571356525],
[34.896136728564962,32.094414095866966],[34.896060382554822,32.093651384268028],[34.89590833074319,32.09289693177903],
[34.895681670460881,32.092156173981266],[34.895382036461321,32.091434447662124],[34.895011589094338,32.090736952374591],
[34.89457299869828,32.090068712988895],[34.894069426324002,32.089434543505348],[34.893504500930824,32.088839012388938],
[34.892882293219344,32.088286409674787],[34.892207286290557,32.087780716080729],[34.891484343342661,32.087325574349137],
[34.890718672638613,32.086924263023583],[34.889915789996522,32.086579672848856],[34.889081479072686,32.086294285963525],
[34.888221749722796,32.086070158034545],[34.887342794740277,32.085908903461977],[34.88645094528237,32.085811683760085],
[34.885552625303909,32.085779199198015],[34.884654305325441,32.085811683760085],[34.88376245586754,32.085908903461977],
[34.882883500885015,32.086070158034545],[34.882023771535131,32.086294285963525],[34.881189460611296,32.086579672848856],
[34.880386577969198,32.086924263023583],[34.879620907265156,32.087325574349137],[34.878897964317261,32.087780716080729],
[34.878222957388473,32.088286409674787],[34.877600749676994,32.088839012388938],[34.877035824283809,32.089434543505348],
[34.876532251909538,32.090068712988895],[34.876093661513472,32.090736952374591],[34.875723214146497,32.091434447662124],
[34.875423580146929,32.092156173981266],[34.875196919864621,32.09289693177903],[34.875044868052996,32.093651384268036],
[34.874968522042856,32.094414095866973],[34.874968433784503,32.095179571356525],[34.875044605816974,32.095942295468511],
[34.875196491194984,32.096696772623602],[34.875422997375715,32.097437566530928],[34.875722494038975,32.098159339364294],
[34.876092824785829,32.098856890232554],[34.876531322632886,32.099525192666555],[34.877034829191757,32.100159430852202],
[34.877599717396535,32.100755034348062],[34.878221917616422,32.101307711036789],[34.878896946965973,32.101813478072422],
[34.87961994160198,32.102268690599843],[34.880385691774507,32.102670068038762],[34.881188679379285,32.103014717742475],
[34.882023117740438,32.103300155859856],[34.882882993336118,32.103524325250085],[34.883762109165694,32.103685610320348],
[34.884654129444634,32.10378284867901],[34.885552625303909,32.103815339520231]]]}
&geometryType=esriGeometryPolygon&inSR=4326&maxAllowableOffset=0.000000&outFields=*&outSR=4326&returnCountOnly=false&returnDistinctValues=false&
returnExtentOnly=false&returnGeometry=true&returnIdsOnly=false&returnM=false&returnZ=true&spatialRel=esriSpatialRelIntersects HTTP/1.1"
I've recreated this error using the "query" page of the feature service using the geometry's json and the GET method:

By using the POST method the query works fine.

My conclusion is that the QueryFeaturesAsync implementation is using the GET method while it should be using the POST method.
So, is my conclusion correct? is it really a bug or am i missing something?

Thanks,

Nir

0 Kudos
0 Replies