Dear Mr. Singaralevan

Thank you very much for your prompt reaction! This is a shot snippet:

def execute(self,ip,function,params):
        global xmltree
        global envelope
        
        operations = xmltree.getElementsByTagName("operation")

        passOn = False

        for operation in operations:
            if operation.getAttribute("name") == function:
                passOn = True

        if (passOn == False):

            if (function == 'getStaatenISO3166alpha2'):                                                 # another wsdl File where this function is not found
                passOn = True
            if (function == 'mammographieIndikationenErmitteln'):                                 # the reported wsdl file (see attachment)
                passOn = True
            if (function == 'antragstypenErmitteln'):
                import pdb; pdb.set_trace()
                passOn = True

        if passOn: .........

Setting a breakpoint after if (passOn == False): the result is

(Pdb) print(operations[0].getAttribute("name"))
abfragenAntragMitCode                                        <operation name="abfragenAntragMitCode">
(Pdb) print(operations[1].getAttribute("name"))
abfragenEbsRelevanteTraeger                                    <operation name="abfragenEbsRelevanteTraeger">
(Pdb) print(operations[2].getAttribute("name"))
abfragenEigeneAntraege                                        <operation name="abfragenEigeneAntraege">                        missing: <operation name="antragstypenErmitteln">
(Pdb) print(operations[3].getAttribute("name"))
beantwortenEvidenzmeldung                                    <operation name="beantwortenEvidenzmeldung">
(Pdb) print(operations[4].getAttribute("name"))
bekanntgebenTerminvereinbarung                                <operation name="bekanntgebenTerminvereinbarung">
(Pdb) print(operations[5].getAttribute("name"))
checkStatus                                                    <operation name="checkStatus">
(Pdb) print(operations[6].getAttribute("name"))
erfassenVerordnerAntrag                                        <operation name="erfassenVerordnerAntrag">                        
(Pdb) print(operations[7].getAttribute("name"))
herunterladenAttachments                                    <operation name="herunterladenAttachments">                        missing: <operation name="mammographieIndikationenErmitteln">
(Pdb) print(operations[8].getAttribute("name"))
nacherfassenAntrag                                            <operation name="nacherfassenAntrag">
(Pdb) print(operations[9].getAttribute("name"))
pruefenAdministrativeAntragsdaten                            <operation name="pruefenAdministrativeAntragsdaten">
(Pdb) print(operations[10].getAttribute("name"))
pruefenOriginalverordnerVpnr                                <operation name="pruefenOriginalverordnerVpnr">
(Pdb) print(operations[11].getAttribute("name"))
stornierenAntrag                                            <operation name="stornierenAntrag">
(Pdb) print(operations[12].getAttribute("name"))
uebernehmenAntragsleistungen                                <operation name="uebernehmenAntragsleistungen">
(Pdb) print(operations[13].getAttribute("name"))
widerrufenTerminvereinbarung                                <operation name="widerrufenTerminvereinbarung">
(Pdb) print(operations[14].getAttribute("name"))
widerrufenUebernahme                                        <operation name="widerrufenUebernahme">
(Pdb) print(operations[15].getAttribute("name"))
abfragenAntragMitCode
(Pdb) print(operations[16].getAttribute("name"))
abfragenEbsRelevanteTraeger
(Pdb) print(operations[17].getAttribute("name"))
abfragenEigeneAntraege
(Pdb) print(operations[18].getAttribute("name"))
beantwortenEvidenzmeldung
(Pdb) print(operations[19].getAttribute("name"))
bekanntgebenTerminvereinbarung
(Pdb) print(operations[20].getAttribute("name"))
checkStatus
(Pdb) print(operations[21].getAttribute("name"))
erfassenVerordnerAntrag
(Pdb) print(operations[22].getAttribute("name"))
herunterladenAttachments
(Pdb) print(operations[23].getAttribute("name"))
nacherfassenAntrag
(Pdb) print(operations[24].getAttribute("name"))
pruefenAdministrativeAntragsdaten
(Pdb) print(operations[25].getAttribute("name"))
pruefenOriginalverordnerVpnr
(Pdb) print(operations[26].getAttribute("name"))
stornierenAntrag
(Pdb) print(operations[27].getAttribute("name"))
uebernehmenAntragsleistungen
(Pdb) print(operations[28].getAttribute("name"))
widerrufenTerminvereinbarung
(Pdb) print(operations[29].getAttribute("name"))
widerrufenUebernahme
(Pdb) print(operations[30].getAttribute("name"))
*** IndexError: list index out of range
(Pdb)
34 times found '<operations name=' in EbsService.wsdl using notepad++ - see attached File. I think loading the wsdl file to the xmltree it should be easily possible to reproduce this problem

Kind regards

Michael Krötlinger
Dr. Ferschitzstr. 2
3160 Traisen

Karthikeyan Singaravelan schrieb am 14.01.2019 15:04:

Karthikeyan Singaravelan <tir.karthi@gmail.com> added the comment:

Thanks for the report. Please post a minimal code snippet with what you are
expecting and the actual output of the program explaining the problem and how
it's a bug in Python and not the actual code's logic.

----------
nosy: +xtreak

_______________________________________
Python tracker <report@bugs.python.org>
<https://bugs.python.org/issue35736>
_______________________________________