POST
|
Hi, I am looking for a way to create an Historical Marker programmatically with arcpy. The archiving is enabled on a dataset in Oracle SDE. I think, it's related with arcpy Version Toolset, but I can't find the documentation about this. Thank you, Maxime
... View more
03-09-2017
07:44 AM
|
0
|
1
|
1350
|
POST
|
From times to times, ArcGIS Server 10.3 failed to generate token because of an error 201 detailed as Error 201 - LDAP Response read Timeout, timeout used:-1ms. In the logs, I see that the DC used for those failed request are not complete. Only the username was sent to the LDAP server instead of the username and password. This error is happening randomly. Most of the times the generate token service returns the token correctly. Any idea what could be the cause of this?
... View more
02-13-2017
05:45 AM
|
0
|
0
|
893
|
POST
|
I think I misread your question, I though you were actually wanted to post data as json string. I dont know if you can change some parameters in arcgis server but by default the ResponseHeader Content-type is set to "application/x-www-form-urlencoded" when using the json output format.
... View more
01-19-2017
10:42 AM
|
0
|
0
|
947
|
POST
|
Thank you, but the aim is to keep the the newlines. Removing it is not wanted.
... View more
01-19-2017
10:35 AM
|
0
|
0
|
607
|
POST
|
Hi, I am using arcgis server 10.3 and it seems we cannot set the request header Content-type to application/json. See this real example: var postData = {"foo": "bar", "f": "json"}; var xhr = new XMLHttpRequest(); xhr.open("POST", https://mydomain.com/arcgis/rest/services/DEV/testService/GPServer/test/execute , true); xhr.setRequestHeader("Content-type", "application/json"); xhr.onreadystatechange = function () { if (xhr.readyState == 4 && xhr.status == 200) { resolve(JSON.parse(xhr.response)); } } xhr.send(JSON.stringify(postData)); Here is the Response Header: Access-Control-Allow-Origin: http://localhost:8080 Cache-Control: max-age=0,must-revalidate, max-age=60 Connection: Keep-Alive Content-Type: text/html;charset=utf-8 Date: Thu, 19 Jan 2017 18:21:59 GMT Expires: Thu, 19 Jan 2017 18:25:32 GMT Keep-Alive: timeout=15, max=100 Server: Set-Cookie: sto-id-47873-cartod=CHHFBJKMFAAA; Domain=mydomain.com; Expires=Sun, 17-Jan-2027 18:21:59 GMT; Path=/ Transfer-Encoding: chunked Vary: Origin X-Frame-Options: SAMEORIGIN X-XSS-Protection: 1; mode=block access-control-allow-credentials: true Here is the Request Header: Host: mydomain.com User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:50.0) Gecko/20100101 Firefox/50.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate, br Access-Control-Request-Method: POST Access-Control-Request-Headers: content-type origin: http://localhost:8080 DNT: 1 Connection: keep-alive Pragma: no-cache Cache-Control: no-cache And nothing appears in the posted params. Nothing is posted, nothing in the response neither.
... View more
01-19-2017
10:31 AM
|
0
|
1
|
947
|
POST
|
@James Crandall : There is no such parameter in json.dumps(), at least in python 2.7
... View more
12-21-2016
06:29 AM
|
0
|
2
|
607
|
POST
|
@James Crandall : This is not working. @Joshua Bixby : The work around I have found is to replace the \\n with other characters, for instance <br> before passing it into the SetParameter() and then in the javavscript I replace back the <br> with \n. Off course that's not really satisfying to proceed this way.
... View more
12-21-2016
06:10 AM
|
0
|
5
|
944
|
POST
|
Using raw strings does not help. my_dict = {"key1" : r"test is a string with\nsome escaped characters\nsuch newlines"}
my_json = json.dumps(my_dict)
print(my_json)
>>> '{"key1": "test is a string with\\\\nsome escaped characters\\\\nsuch newlines"}'
arcpy.SetParameter(0, my_json)
Same problem with the json in the javascript console:
{"key1" : "test is a string with
some escaped characters
such newlines"}
... View more
12-21-2016
04:53 AM
|
0
|
10
|
944
|
POST
|
Hi Dan, It seems its an issue with the SetParameter(). I can't find any solution for this case. Is this should be reported to Esri support?
... View more
12-20-2016
04:51 AM
|
0
|
13
|
944
|
POST
|
I have a geoservice that get some text stored from a table in order to return a json string to a javascript client. However, the arcpy.SetParameter() seems to have problem to returns the escaped new lines character ( \\n ) my_dict = {"key1" : "test is a string with\nsome escaped characters\nsuch newlines"}
my_json = json.dumps(my_dict)
print(my_json)
>>> '{"key1": "test is a string with\\nsome escaped characters\\nsuch newlines"}'
arcpy.SetParameter(0, my_json) in the javascript console the response is the following which is not a valid json: {"key1" : "test is a string with
some escaped characters
such newlines"}
Is there a solution?
... View more
12-19-2016
12:14 PM
|
0
|
16
|
2413
|
POST
|
Is it possible with arcpy to reproject single x,y coordinates without building a complete geometry object. For instance is it possible to do something like this input = [[-8081441,5685214], [-8081446,5685216], [-8081442,5685219], [-8081440,5685211], [-8081441,5685214]]
output = [arcpy.A_Reproj_Fn((coord[0], coord[1]), source_SR, dest_SR) for coord in input]
I have huge arrays of coordinates to reproject, but for performance issue I dont want to build a geometry object before reprojecting. Thank you for any suggestion!
... View more
12-05-2016
05:15 AM
|
0
|
1
|
678
|
POST
|
Hi, I realize that arcgis server is creating a lot of locks on the geodatable SDE on oracle. The locks are the following: Object Name Object Type Lock Type Lock Owner Lock Mode 11442 Version state me shared It seems that a lock like this one is created for every running instance of the service. What is that kind of lock? How could it be created? What the Object Name 11442 is meaning? I can't find any info about this problem on google, so maybe someone here knows what it is about. Thank you for your help!
... View more
11-02-2016
12:35 PM
|
1
|
0
|
821
|
POST
|
Is it possible to replace the default arcpy error message with a custom message using `arcpy.AddError(msg)` or else for a GP Service published into ArcGIS Server? if I use: arcpy.AddError("This is my custom error message") My custom message only appears printed in the details. like this: (sorry its in french): { error : { code: 400, message: "Unable to complete operation.", details: [ "Erreur d’exécution de l’outil. AppLogin Job ID: jfe0aa728897644eb9344fa9fc7a48864 : This is my custom error message Échec de l’exécution de (AppLogin). Échec de l’exécution de (AppLogin)." ] } What I want instead its just: { error : { code : 400, message : "This is my custom error message" } }
... View more
10-12-2016
12:34 PM
|
0
|
2
|
995
|
POST
|
I want to publish a GP Service to ArcGIS Server without default input parameter. However, I also want that GP Service to return an error when no input parameter is provided. How could I do so? ArcGIS wont let met publish a GP Service that returns an error, and if I run it with a valid input value, it will be defined as the default value and I wont be able to remove it.
... View more
10-12-2016
05:52 AM
|
0
|
0
|
693
|
POST
|
I now use the full path to a .sde file located somewhere that both my desktop and the server have access. That solve the problem as expected. However, there is still something strange that happen. I have many GP Services to publish, and I have to close/reopen ArcMap between every publishing process. If not, I got the cannot open table error in the server logs when I call the service through REST. Any Idea why? All GP Services use the same path to the same .sde file as workspace.
... View more
09-29-2016
08:05 AM
|
0
|
0
|
2030
|
Title | Kudos | Posted |
---|---|---|
1 | 08-30-2021 06:44 AM | |
1 | 08-30-2021 07:07 AM | |
1 | 08-30-2021 08:21 AM | |
1 | 11-28-2023 02:02 PM | |
1 | 12-04-2023 05:58 AM |
Online Status |
Offline
|
Date Last Visited |
06-09-2024
06:13 PM
|