Code: Select all
from suds.client import Client
wsdl = "https://path/to/scv?wsdl"
client = Client(wsdl)
token = client.factory.create("ns1:AuthenticationToken")
token.LoginName = "login"
token.UserId = "userid"
token.Password = "password"
client.set_options(soapheaders=token)
articleno = "articleno"
list = client.factory.create("ns1:ArticlesList")
list.Article.append(articleno)
result = client.service.GetStockLevel(list)
< /code>
Beim Inspektieren des Streams verwendet ich HTTP anstelle von HTTPS, was einen Fehler verursacht, da der Endpunkt ein HTTP301 dazu angibt. Obwohl ich meine URL mit https: //
Starte>