WSUS WSDL文件的URL是什么。
我尝试打 http://10.66.195.242:80/ApiRemoting30/WebService.asmx?wsdl
服务器返回500-内部错误
我尝试了zeep方式
from requests import Session
import zeep
from zeep.transports import Transport
from zeep import Settings
import requests
from requests_ntlm import HttpNtlmAuth
user = r'NH-2K8-R2-3\administrator'
password = "xxxxxx"
url = "http://10.66.195.242:80/ApiRemoting30/WebService.asmx"
session = Session()
session.auth = HttpNtlmAuth(user, password)
transport_with_basic_auth = Transport(session=session)
client = zeep.Client(
wsdl=url,
transport=transport_with_basic_auth
)
client.wsdl.dump()
这里我也遇到内部服务器错误500
$ python NTLMAuth.py
Traceback (most recent call last):
File "NTLMAuth.py", line 27, in <module>
service_name='GetServerVersion'
File "C:\ProgramData\Anaconda3\lib\site-packages\zeep\client.py", line 62, in __init__
wsdl, self.transport, settings=self.settings)
File "C:\ProgramData\Anaconda3\lib\site-packages\zeep\wsdl\wsdl.py", line 82, in __init__
document = self._get_xml_document(location)
File "C:\ProgramData\Anaconda3\lib\site-packages\zeep\wsdl\wsdl.py", line 143, in _get_xml_document
location, self.transport, self.location, settings=self.settings)
File "C:\ProgramData\Anaconda3\lib\site-packages\zeep\loader.py", line 74, in load_external
content = transport.load(url)
File "C:\ProgramData\Anaconda3\lib\site-packages\zeep\transports.py", line 110, in load
content = self._load_remote_data(url)
File "C:\ProgramData\Anaconda3\lib\site-packages\zeep\transports.py", line 127, in _load_remote_data
response.raise_for_status()
File "C:\ProgramData\Anaconda3\lib\site-packages\requests\models.py", line 935, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http://10.66.195.242:80/ApiRemoting30/WebService.asmx
当我检查http数据包时,我发现应该传递SOAP信封,或者我错过了其他东西。
基本上,我想用WSUS服务器进行SOAP调用以查询更新详细信息。