Esempio n. 1
0
    def __init__(
        self, location, transport: typing.Type["Transport"], base=None, settings=None
    ):
        """Initialize a WSDL document.

        The root definition properties are exposed as entry points.

        """
        self.settings = settings or Settings()

        if isinstance(location, str):
            if is_relative_path(location):
                location = os.path.abspath(location)
            self.location = location
        else:
            self.location = base

        self.transport = transport

        # Dict with all definition objects within this WSDL
        self._definitions = (
            {}
        )  # type: typing.Dict[typing.Tuple[str, str], "Definition"]
        self.types = Schema(
            node=None,
            transport=self.transport,
            location=self.location,
            settings=self.settings,
        )
        self.load(location)
Esempio n. 2
0
    def __init__(self, location, transport, base=None, strict=True):
        """Initialize a WSDL document.

        The root definition properties are exposed as entry points.

        """
        if isinstance(location, six.string_types):
            if is_relative_path(location):
                location = os.path.abspath(location)
            self.location = location
        else:
            self.location = base

        self.transport = transport
        self.strict = strict

        # Dict with all definition objects within this WSDL
        self._definitions = {}
        self.types = Schema(node=None,
                            transport=self.transport,
                            location=self.location,
                            strict=self.strict)

        document = self._get_xml_document(location)

        root_definitions = Definition(self, document, self.location)
        root_definitions.resolve_imports()

        # Make the wsdl definitions public
        self.messages = root_definitions.messages
        self.port_types = root_definitions.port_types
        self.bindings = root_definitions.bindings
        self.services = root_definitions.services
Esempio n. 3
0
    def __init__(self, location, transport, base=None, settings=None):
        """Initialize a WSDL document.

        The root definition properties are exposed as entry points.

        """
        self.settings = settings or Settings()

        if isinstance(location, six.string_types):
            if is_relative_path(location):
                location = os.path.abspath(location)
            self.location = location
        else:
            self.location = base

        self.transport = transport

        # Dict with all definition objects within this WSDL
        self._definitions = {}
        self.types = Schema(
            node=None,
            transport=self.transport,
            location=self.location,
            settings=self.settings)

        document = self._get_xml_document(location)

        root_definitions = Definition(self, document, self.location)
        root_definitions.resolve_imports()

        # Make the wsdl definitions public
        self.messages = root_definitions.messages
        self.port_types = root_definitions.port_types
        self.bindings = root_definitions.bindings
        self.services = root_definitions.services
    def __init__(self,
                 location,
                 transport: typing.Type["Transport"],
                 base=None,
                 settings=None):
        """Initialize a WSDL document.

        The root definition properties are exposed as entry points.

        """
        self.settings = settings or Settings()

        if isinstance(location, str):
            if is_relative_path(location):
                location = os.path.abspath(location)
            self.location = location
        else:
            self.location = base

        self.transport = transport

        # Dict with all definition objects within this WSDL
        self._definitions = (
            {})  # type: typing.Dict[typing.Tuple[str, str], "Definition"]
        self.types = Schema(
            node=None,
            transport=self.transport,
            location=self.location,
            settings=self.settings,
        )

        document = self._get_xml_document(location)

        root_definitions = Definition(self, document, self.location)
        root_definitions.resolve_imports()

        # Make the wsdl definitions public
        self.messages = root_definitions.messages
        self.port_types = root_definitions.port_types
        self.bindings = root_definitions.bindings
        self.services = root_definitions.services