Custom Handler and Web Services
Copyright © 2019 EarthSoft, Inc • Modified: 31 May 2019
The code in the EDP custom handler can call web services and perform other tasks that .NET code enables.
The EDP format custom handler can call a web service to do a simple GIS validation. This tool verifies data within an EDD to verify that the coordinates and map quadrant specified in the EDD correspond correctly.
A web service that automatically converts the coordinates as the data is loaded in EDP can be included in the custom handler.
Ensure that the EDP custom handler gracefully handles situations when the web service is not available.
Calling a web service for every row in an EDD can take a while, particularly for large EDDs.
For access to a database connection from an extension of EddCustomHandler, there is a method called AddDataHandlers. This method accepts an EddFormatDefinition object called Efd. The Efd object has access to the connection via Efd.Package.Connection. Storing a reference to that Efd object when the AddDataHandlers method is called provides access to it anywhere else in the code. In EDP Standalone mode, this connection object will be nothing.