I just started developing an SOI for a project and instantly felt the pain in the debugging cycle. Looking around I was not seeing much in the way of better ways to handle this. This starting me looking at the calls that needed to be made up upload/register and enable an SOI for a service. To handle the interaction I created a python script that allows me to handle all of the interactions.
- Update the Python Scripts (see attached) to match your variables
- This python uses the requests module to handle all the API call you will need to ensure it is installed
- In the Init Section of the SOI add the System Debug Flag
public void Init ( IServerObjectHelper pSOH )
- In the SOI project you will need to edit the .csproj file to add a handler to run the python after a build
- <Target AfterTargets="RunArcGISPostPackageEvent" Name="RegisterSOI"> <Exec Command="c:\Python27\ArcGIS10.4\python.exe <PATH TO PYTHON FILE>" /> </Target>
- This will fire the python script each time you build your project.
- Once the SOI is registered it will attempt to attach to the Visual Studio Session you have open (provided you opened as a Administrator)