Extending Ladon with new interface protocols — Ladon 0.9.21 documentation

# Extending Ladon with new interface protocols

class `ladon.interfaces.base.` `BaseInterface`(sinfo, **kw)

  All interface implementations must descend from BaseInterface. The interface implementation can be thought of as an aggregator that ties the three basic functions of a web service protocol together:

  > 1. ServiceDescriptor - A generator class that can provide a description for the service. ie. WSDL for soap.
  > 2. BaseRequestHandler - A handler that can parse the raw request objects from the client and convert them into a so-called req_dict (Request dictionary)
  > 3. BaseResponseHandler - A handler that can process the res_dict (Result Dictionary) of a service call and build a response object that fit’s the protocol being implemented.
  > 4. BaseFaultHandler - A handler that can convert a ladon.exceptions.service.ServiceFault object to a fault response that fits the interface.

It is recommended that you study ladon.interfaces.jsonwsp to learn howto extend Ladon with more protocols.

## Adding the interface

Currently you have to add an import statement in the bottom of ladon/interfaces/__init__.py to add your protocol to Ladon. This is a temporary solution.

Like this:

    import ladon.interfaces.soap
    import ladon.interfaces.jsonwsp
    # My CORBA implementation
    import ladon.interfaces.corba