Services¶
This section deals with the creation of new Hervices handlers that allow to process OGC web service requests and are easily exposed via the ows view.
Service Handlers are Components
that at least implement the ServiceHandlerInterface. For a Service
Handler to be fully accessible it is also necessary to implement either or both
of GetServiceHandlerInterface and
PostServiceHandlerInterface.
For general information about Plugins/Components please refer to the
Plugins documentation.
Initial Setup¶
Each service handler must provide the following:
- The
servicethe handler will contribute to- The
versionsof theservicethe handler is capable of responding to- The
requestof theservicethe handler is able to respond- a
handlemethod that takes adjango.http.HttpRequestas parameter
A service handler can provide an index, which allows the sorting of
the handlers in a “GetCapabilities” response.
The following is an example handler for the “GetCapabilities” handler of the
fictional WES (Web Example Service):
from eoxserver.core import Component, implements, ExtensionPoint
from eoxserver.services.ows.interfaces import (
ServiceHandlerInterface, GetServiceHandlerInterface,
PostServiceHandlerInterface
)
class WESGetCapabilitiesHandler(Component):
implements(ServiceHandlerInterface)
implements(GetServiceHandlerInterface)
implements(PostServiceHandlerInterface)
service = "WES"
request = "GetCapabilities"
versions = ["1.0"]
def handle(self, request):
...
Note
A word about versions: in EOxServer they are represented by the
Version class. It follows OGC
conventions on treating versions. So for example the versions “1.0” and
“1.0.1” are considered equal. For our example this means that our handler
will be able to respond to any request with a version “1.0.x”.