Looking for assistance on passing values into SOE
In Geocortex Workflow Designer (.NET) version for Essentials, we use a Web Request activity to create arguments and pass values into a server object extension (custom capability on a map service). I don't see a way to do this at first glance with the Send Web Request activity in Workflow5. I'd need to pass in a geometry(s), LayerId, and a few other optional arguments. Any examples out there? Is there another method to use?
-
Hi Ryan,
Yes, this is possible to do with the Send Web Request activity. Depending on what the SOE expects, you can send a GET or POST to any URL and send any request body or URL parameters. The form or json inputs might handle the geometry as well.
We don't have any example workflows of configuring this, but hopefully that is enough information to get started.
Thanks, Stefan
0 -
Hi Stephan. Good to know I don't need any custom activity. I think I am still needing assistance populate the Send Web Request activity properly. Are you able to populate the parameters of that activity for me? When I populate the query or url, I get no results, and the web request in the browser does something funky to the geometry string. https://gis.test.blm.gov/arcgis/rest/services/lands/BLM_Natl_SMA_LimitedScale/MapServer/exts/AreasAndLengths/execute I sent a working example in the ticket. ………………………………………………………. Ryan Kelley Geographic Information Specialist OR/WA - BLM, Oregon State Office Portland, OR 97204 503.808.6495 rkelley@blm.gov ………………………………………………………. 0 -
Hi Ryan,
I was able to provide parameters in the Query input for your example Url (ending in execute) using the GET method, and providing a Query using this syntax:
={
layerID: '1',
geometries: '{"a": "2"}'
}
Fiddler shows the values being input correctly and the request parameters included.
Thanks, Stefan
0 -
Hi Stefan,
Thanks for the reply. I am having a hard time understanding the geometry piece I guess. Is this query syntax actually what you used to get results? I don't know how that can be if so... no coordinates? If you do have a working example for the syntax, I'd really appreciate that. Thanks!
0 -
Hi Ryan, do you ask about the geometry object input syntax? if you do, this is what I find: https://developers.arcgis.com/documentation/common-data-types/geometry-objects.htm
0 -
Thanks for the reference Longguang! I am still having a hard time getting the syntax right to account for the 'geometries' parameter in the SOE. Any ideas where I am going wrong here? Trying to pass in a simple geometry.
={
layerID: '1',
geometries: '[{"rings": [[[-13640694,5547521],[-13492101,5547521],[-13492101,5442955],[-13640694,5442955],[-13640694,5547521]]],
"spatialReference" : {"wkid" : 102100}}]'
}
soe of interest @ https://gis.test.blm.gov/arcgis/rest/services/lands/BLM_Natl_SMA_LimitedScale/MapServer/exts/AreasAndLengths/execute
0 -
Hi Ryan,
Last piece of the puzzle (I think), is that they geometries input when run in a Send Web Request, should include escape sequences. I was able to receive a 200 from your SOE using:
={
layerID: '1',
geometries: '"{\"refValueType\":\"geometry\",\"format\":\"point\",\"geometry\":[{\"type\":\"point\",\"x\":-13636078.27298879,\"y\":4547054.644463109,\"spatialReference\":{\"wkid\":102100,\"latestWkid\":3857}}]}"'
}
Thanks, Stefan
0 -
For a polygon geometry:
"{\"refValueType\":\"geometry\",\"format\":\"polygon\",\"geometry\":[{\"type\":\"polygon\",\"rings\":[[[-13635562.323047867,4546825.3333782535],[-13634090.91025338,4545392.1390979085],[-13636556.004415574,4544360.23921606],[-13635562.323047867,4546825.3333782535]]],\"_ring\":0,\"spatialReference\":{\"wkid\":102100,\"latestWkid\":3857},\"cache\":{\"_extent\":{\"xmin\":-13636556.004415574,\"ymin\":4544360.23921606,\"xmax\":-13634090.91025338,\"ymax\":4546825.3333782535,\"spatialReference\":{\"wkid\":102100,\"latestWkid\":3857}},\"_partwise\":null}}]}"
0 -
Thanks Stefan!
0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
9 kommentarer