Beispiel #1
0
    def parse_messages(self, doc: etree._Element):
        """

        Definition::

            <definitions .... >
                <message name="nmtoken"> *
                    <part name="nmtoken" element="qname"? type="qname"?/> *
                </message>
            </definitions>

        :param doc: The source document
        :type doc: lxml.etree._Element

        """
        result = {}
        for msg_node in doc.findall("wsdl:message", namespaces=NSMAP):
            try:
                msg = parse.parse_abstract_message(self, msg_node)
            except IncompleteMessage as exc:
                warnings.warn(str(exc))
            else:
                result[msg.name.text] = msg
                logger.debug("Adding message: %s", msg.name.text)
        return result
Beispiel #2
0
    def parse_messages(self, doc):
        """

        Definition::

            <definitions .... >
                <message name="nmtoken"> *
                    <part name="nmtoken" element="qname"? type="qname"?/> *
                </message>
            </definitions>

        :param doc: The source document
        :type doc: lxml.etree._Element

        """
        result = {}
        for msg_node in doc.findall("wsdl:message", namespaces=NSMAP):
            try:
                msg = parse.parse_abstract_message(self, msg_node)
            except IncompleteMessage as exc:
                warnings.warn(str(exc))
            else:
                result[msg.name.text] = msg
                logger.debug("Adding message: %s", msg.name.text)
        return result
Beispiel #3
0
    def parse_messages(self, doc):
        """
            <definitions .... >
                <message name="nmtoken"> *
                    <part name="nmtoken" element="qname"? type="qname"?/> *
                </message>
            </definitions>

        :param doc: The source document
        :type doc: lxml.etree._Element

        """
        result = {}
        for msg_node in doc.findall("wsdl:message", namespaces=NSMAP):
            msg = parse.parse_abstract_message(self, msg_node)
            result[msg.name.text] = msg
            logger.debug("Adding message: %s", msg.name.text)
        return result