【问题标题】:SUDS SOAP WSDL not working with Vormetric ApplianceSUDS SOAP WSDL 不适用于 Vormetric 设备
【发布时间】:2016-01-05 22:14:03
【问题描述】:

我正在尝试使用 Jerko SUDS 生成对 Vormetric 密钥服务器的 WSDL 客户端调用,以在平台上显示密钥。我正在使用 SUDS 元素来构造 SOAP 消息。

from suds.client import Client
from suds.sax.element import Element
import ssl
import logging

logging.basicConfig(level=logging.INFO)
logging.getLogger('suds.client').setLevel(logging.DEBUG)

ssl._create_default_https_context = ssl._create_unverified_context

url = 'https://<dkm>/communication-server/SSControllerCli?wsdl'
client = Client(url)

login = Element('loginInfo')
user = Element('userName').setText('xxx')
auth = Element('password').setText('xxx')
domain = Element('domainName').setText('xxx')
keyType = Element('switchKey').setText('All')
login.append(user)
login.append(auth)
login.append(domain)

result = client.service.ShowAllKeys(login, keyType)
print result

当我执行此操作时,它似乎可以工作,并生成一条良好的 SOAP 消息,但是在尝试执行时出现服务器错误。

DEBUG:suds.client:sending to (https://<dkm>/communication-server/SSControllerCli)
message:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:ns0="http://www.vormetric.com/securityserver/clicommon/2010/02/26" xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="htt
p://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
   <SOAP-ENV:Header/>
   <ns1:Body>
      <ns0:ShowAllKeys>
         <loginInfo>
            <userName>xxx</userName>
            <password>xxx</password>
            <domainName>xxx</domainName>
         </loginInfo>
         <switchKey>All</switchKey>
      </ns0:ShowAllKeys>
   </ns1:Body>
</SOAP-ENV:Envelope>
DEBUG:suds.client:headers = {'SOAPAction': '""', 'Content-Type': 'text/xml; charset=utf-8'}
DEBUG:suds.client:HTTP failed - 500 - Internal Server Error:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><soap:Fault><faultcode>soap:Server</faultcode><faultstring>An internal error oc
curred on the Security Server. Refer to cgss.log and server.log for details. Call support if necessary.</faultstring><detail><CgssServerFaultDetail xmlns="http:
//www.vormetric.com/securityserver/clicommon/2010/02/26"><servername>***REMOVED***</servername><errorcode>DAO0038E</errorcode><errormessage>A
n internal error occurred on the Security Server. Refer to cgss.log and server.log for details. Call support if necessary.</errormessage></CgssServerFaultDetail
></detail></soap:Fault></soap:Body></soap:Envelope>
ERROR:suds.client:<suds.sax.document.Document instance at 0x0000000003E0BA48>
Traceback (most recent call last):
  File "vorm-soap-suds.py", line 29, in <module>
    result = client.service.ShowAllKeys(login, keyType)
  File "build\bdist.win-amd64\egg\suds\client.py", line 521, in __call__
  File "build\bdist.win-amd64\egg\suds\client.py", line 581, in invoke
  File "build\bdist.win-amd64\egg\suds\client.py", line 619, in send
  File "build\bdist.win-amd64\egg\suds\client.py", line 670, in process_reply
suds.WebFault: Server raised fault: 'An internal error occurred on the Security Server. Refer to cgss.log and server.log for details. Call support if necessary.
'

有趣的是,我知道消息结构本身是好的,因为我可以将它放入 Chrome Wizdler 应用程序中并且它运行良好,所以这似乎是 SUDS 特有的问题。

感谢任何帮助。

【问题讨论】:

    标签: python python-2.7 suds


    【解决方案1】:

    我自己也遇到过这个问题。这可能与正在使用的信封/命名空间有关,它不再是最新的。 谈这个: xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" 验证您的 XML 时,我得到以下信息:

    元素 Envelope@http://schemas.xmlsoap.org/soap/envelope/ 不是有效的 Envelope@http://www.w3.org/2003/05/soap-envelope 文档或有效替换。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-07-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-05-10
      相关资源
      最近更新 更多