示例#1
0
文件: soap11.py 项目: leobispo/spyne
    def __init__(self, app=None, validator=None, wrapped=True,
                                xml_declaration=True, cleanup_namespaces=False):
        XmlObject.__init__(self, app, validator, xml_declaration,
                                                             cleanup_namespaces)

        self.__wrapped = wrapped

        # SOAP requires DateTime strings to be in iso format. This function
        # bypasses datetime formatting via DateTime(format="...") string.
        self.serialization_handlers[DateTime] = _datetime_to_parent_element
        self.deserialization_handlers[DateTime] = _datetime_from_element
示例#2
0
文件: soap11.py 项目: leekchan/spyne
    def __init__(self, app=None, validator=None, wrapped=True,
                                xml_declaration=True, cleanup_namespaces=False):
        """Soap 1.1 Protocol with validators.

        :param app: A spyne.application.Application instance.
        :param validator: The validator to use. Currently the only supported
            value is 'lxml'
        :param wrapped: Whether the return type should be wrapped in another
            object. Default is 'True'.
        :param xml_declaration: Whether to add xml_declaration to the responses
            Default is 'True'.
        :param cleanup_namespaces: Whether to add clean up namespace declarations
            in the response document. Default is 'False'.
        """
        XmlObject.__init__(self, app, validator, xml_declaration,
                                                             cleanup_namespaces)

        self.__wrapped = wrapped