如何修复Suds Soap Server WebFault引发Null错误

时间:2019-04-11 04:27:09

标签: suds

当我尝试访问suds上的方法时出现问题,它向我显示错误,例如soap web-fault sever引发null

我也使用过zeep和请求,但遇到同样的错误

import suds
from suds.client import Client
import requests
from suds import WebFault
from suds.transport.https import HttpAuthenticated
import logging
logging.basicConfig(level=logging.DEBUG)
logging.getLogger('suds.client').setLevel(logging.DEBUG)
logging.getLogger('suds.transport').setLevel(logging.DEBUG)
logging.getLogger('suds.xsd.schema').setLevel(logging.DEBUG)
logging.getLogger('suds.wsdl').setLevel(logging.DEBUG)
username =  ""
password = ""
url = ""
try:
    t = HttpAuthenticated(username=username, password=password)
    my_client = Client(url=url,transport = t,headers = {"SOAPAction":"CI_Z_SP_HR_DETAILS_G.V1","content-type": "text/xml"})
    methods = [m for m in my_client.wsdl.services[0].ports[0].methods]
    print(my_client)
    print("Mthods : ", methods)
    # peronal_Details = myclient.service.
except suds.WebFault as e:
    print(e)

0 个答案:

没有答案