ArcGIS Enterprise: Extending Services · 2017. 2. 28. · CUSTOMIZE Portal API EXTEND CREATE....
Transcript of ArcGIS Enterprise: Extending Services · 2017. 2. 28. · CUSTOMIZE Portal API EXTEND CREATE....
Agenda
• Introduction
• Geoprocessing tools
• Server Object Extensions
• Server Object Interceptors
• Demo
CUSTOMIZE EXTENDCREATE
• Mobile
applications
• Desktop
applications
• Web
applications
• Application
templates
• Look and feel
of websites
• Geoprocessing
tools
• Server object
extensions
• Server object
interceptors
Why extend?
• Out of the box capability is not enough
• Custom business logic
- Security
- Analytical tools
- QA/QC workflows
- Notification
• Java or .NET developers on staff
• Experience with Esri’s Arcobjects API
You need not worry about…
• Framework handles…
- Identity
- Authentication
- Authorization
- Scalability
- Availability
• SDK provides…
- IDE integration with Java and .NET
- Boiler plate code
- SDK and samples
• You focus on writing code
Geoprocessing tools
• Custom analysis models and
functions
• Ability to call into external
analytical libraries
• Asynchronous (optional)
• Scalable
Server object extensions
• Available since 9.2
• Adds new geospatial capability to the
server’s Map and Image services
• New API and web endpoint
• Custom clients needed to work with new
API and web endpoint
Server object extensions – internals
GIS Server
APPSMap Services
Image Services
SOE
SOE
Well defined API
CUSTOM APPS
New custom API
Developing a server object extension
IDE
IMPLEMENT
PACKAGE
DEPLOY
TEST
DEBUG
Install SDK for
Java or .NET
Implement specific
interfaces
Package as .soe
Upload through
Server Manager
Enable debugging
and attach
breakpoint
Interfaces
Name Functions Purpose
IServerObjectExtension init(…)shutdown()
Initialization of SOECleanup
IRESTRequestHandler getSchema()
handleRESTRequest(…)
Define the API as resources and operationsHandle all REST resources and operation requests
IRequestHandler2 handleStringRequest(…)handleBinaryRequest(…)
Handle SOAP requestsHandle “binary” requests from ArcMap
TIP: This should execute
very quickly!
Server object extensions – use cases
• Advanced editing
• Advanced symbology and rendering
• Data extraction
• Advanced raster functions
• Raster management
Server object interceptors
• Available from 10.3.1
• Intercepts requests and responses on Map and
Image services
• No new API or web endpoint
• All Map and Image service clients continue to
work
• Does not work for tiled map services and
hosted feature services
Server object interceptors – internals
GIS Server
APPSMap Services
Image Services
SOI
SOI
Well defined API
EXISTING APPS
New API
Server object interceptors – execution sequence
GIS Server
ArcSOC.exeAPPS
Well defined API
Map
Service
Object
SOIREST
HANDLER
EXTERNAL
RULE DATABASE
FILTER
REQUESTS AND
RESPONSES
Server object interceptors – use cases
• Advanced security
- E.g. Layer level access
• Filtering content
- E.g. Attribute filtering
• Post-processing content
- E.g. Watermark
• Notifications
• Augmenting spatial information
- E.g. Merging spatial assets and observations
Interfaces
Name Functions Purpose
IServerObjectExtension init(…)shutdown()
Initialization of SOECleanup
IRESTRequestHandler getSchema()
handleRESTRequest(…)
Define the API as resources and operationsHandle all REST resources and operation requests
IRequestHandler2 handleStringRequest(…)handleBinaryRequest(…)
Handle SOAP requestsHandle “binary” requests from ArcMap
IWebRequestHandler handleStringWebRequest(…) Handle OGC requests
Server object interceptors – chaining
• New at 10.4
• Allows for a chain of interceptors on Map and
Image services
• Ideal for mixing in-house and third-party
interceptors
• Interceptors can be repeated
- Useful for ensuring security
• At 10.4, only admins can deploy
interceptors/extensions by default
New API
Chained server object interceptors – execution sequence
GIS Server
APPSArcSOC.exe
Well defined API
Map
Service
Object
SOI 1REST
HANDLER
EXTERNAL
SYSTEM
SOI 2
Best practices
• Start with SDK samples
- Contains boiler plate code
• For server object interceptors, you cannot change the
Map and Image services API
- This will break client applications
- For new API use server object extensions
• Use server’s logger to log useful status about your
interceptor/extension
- Variety of log levels to suit the granularity
Tips
• One instance of interceptor/extension per Map or Image
instance
• Enable debugging through Manager
• .NET Attach to all ArcSOC.exe processes
• Java Attach IDE to debugging port
• Disable extension debugging in production
• Copy dependent JARs to server and list dependent JAR
files in MANIFEST.MF class-path
• Register .NET dependencies in GAC
References
• ExportImageSOI by Mansour Raad
• Help on extending services
• Security Classification Code
Please Take Our Survey on the Esri Events App!
Select the session
you attended
Scroll down to find
the survey
Complete Answers
and Select “Submit”
Download the Esri Events
app and find your event