4

我正在使用 SUDS 使用以下代码调用 SOAP:

client = Client("https://xyz.rwth.de/SecuredDataService/SecuredData?wsdl",location="https://xyz.rwth.de/SecuredDataService/SecuredData",cache=None)

对于 HTTP 请求,类似于上述代码的请求有效(上述请求中没有位置部分和正确的 HTTP URL),但对于 HTTPS,它会失败并给出以下错误。

调试:suds.wsdl:正在阅读 wsdl: https ://xyz.rwth.de/SecuredDataService/SecuredData?wsdl ...

DEBUG:suds.xsd.sxbasic:Import:0x1025f5710, 导入 ns="http://secured.services.xyz123.org/", location="http://xyz.rwth.de:7070/SecuredDataService/SecuredData?xsd =1"

调试:suds.transport.http:opening ( http://xyz.rwth.de:7070/SecuredDataService/SecuredData?xsd=1 )

错误:django.request:内部服务器错误:/XYZ12/index.html/

我得到一个urlopen error [Errno 60] Operation timed out

基本上,日志文件显示该location参数没有被使用,而是在 WSDL 文件中指定的位置(即: http: //xyz.rwth.de :7070/SecuredDataService/SecuredData?xsd=1 )被使用。为什么会这样,即使 SUDS 文档明确指出:location: This overrides the service port address URL defined in the WSDL.

编辑:添加cache=None正确的位置后被调用,整个 WSDL 被打印在日志文件中。然而,在那之后,同样的错误(如上所述)被打印在日志文件中。

4

0 回答 0