Allegro API soap + python soappy

0

Witam.
Mam problem z allegro api. Mam taki kod:

from SOAPpy import WSDL
 
wsdlFile = "http://webapi.allegro.pl/uploader.php?wsdl"
webapikey = "apiKey" # your webapi-key
component = 1 # 1-AllegroWebApi
countryID = 1 # 1-Poland
login = 'tajnylogin'
password = 'tajnehasło'
version = 123456789
 
server = WSDL.Proxy(wsdlFile)
 
server.soapproxy.config.dumpSOAPOut = 1
server.soapproxy.config.dumpSOAPIn = 1
result = server.doGetCountries(countryID, webapikey)
#result = server.doQuerySysStatus(component, countryID, webapikey)
#result = server.dodoLogin(login, password, countryID, version)

No i w odpowiedzi zawsze dostaję ten sam komunikat, którejkolwiek bym metody nie użył z tych trzech zakomentowanych:

ERR_INPUT_COUNTRY_ERROR: Country code is missing or is incorrect.

Oto przykładowy zrzut xml:
wychodzący:

<?xml version="1.0" encoding="UTF-8"?>                                                                                                                                                                       
<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/1999/XMLSchema">
    <SOAP-ENV:Body>                                                                                                                                                                                              
        <ns1:doQuerySysStatus xmlns:ns1="urn:AllegroWebApi" SOAP-ENC:root="1">                                                                                                                                       
            <v1 xsi:type="xsd:int">1</v1>                                                                                                                                                                                
            <v2 xsi:type="xsd:int">1</v2>                                                                                                                                                                                
            <v3 xsi:type="xsd:string">apiKey</v3>                                                                                                                                                                      
        </ns1:doQuerySysStatus>                                                                                                                                                                                      
    </SOAP-ENV:Body>                                                                                                                                                                                             
</SOAP-ENV:Envelope>

i odpowiedź:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <SOAP-ENV:Body>
        <SOAP-ENV:Fault>
            <faultcode>ERR_INPUT_COUNTRY_ERROR</faultcode>
            <faultstring>Country code is missing or is incorrect.</faultstring>
            <faultactor>doQuerySysStatus - Invalid country.</faultactor>
            <detail>
                <soapVal><ERRNO xsi:type="xsd:string">158:1347188121:21</ERRNO></soapVal>
            </detail>
        </SOAP-ENV:Fault></SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Czemu tak się dzieje? czy to ja robię coś źle, czy to wina api? Ktoś się z tym spotkał?
Pozdrawiam :)

1

Problem rozwiązany.
Można przekazywać parametry za pomocą słownika, tylko trzeba go poprzedzić **:

server.doQuerySysStatus(**{'sysvar': component, 'country-id': countryID, 'webapi-key': webapikey})

Problemem były - w nazwach parametrów.

1 użytkowników online, w tym zalogowanych: 0, gości: 1