是否有任何公开可用的SOAP 1.2/WSDL 2.0兼容免费Web服务来测试基于Python的soap客户端库(例如Zolera SOAP Infrastructure)?
到目前为止,在我看来,Google Web API可能是唯一的选择.
否则,如何测试符合SOAP 1.2的客户端库?
首先,我承认我是Web服务的新手,虽然我熟悉HTML和基本Web内容.我使用Python创建了一个快速而肮脏的Web服务,该服务调用MySQL数据库中的存储过程,该服务只返回BIGINT值.我想在Web服务中返回此值,并且我想生成一个我可以为Web开发人员提供的WSDL.我可以补充一点,存储过程只返回一个值.
这是一些示例代码:
#!/usr/bin/python
import SOAPpy
import MySQLdb
def getNEXTVAL():
cursor = db.cursor()
cursor.execute( "CALL my_stored_procedure()" ) # Returns a number
result=cursor.fetchall()
for record in result:
return record[0]
db=MySQLdb.connect(host="localhost", user="myuser", passwd="********", db="testing")
server = SOAPpy.SOAPServer(("10.1.22.29", 8080))
server.registerFunction(getNEXTVAL)
server.serve_forever()
Run Code Online (Sandbox Code Playgroud)
我想生成一个我可以给网络人员的WSDL,我想知道是否可以让SOAPpy为我生成一个.这可能吗?
我正在阅读一些由ZSI为python生成的代码.有一条这样的线
def verifyVehicle(self, request, **kw):
....
我想知道这个**kw neams是什么.这是一个字典类型吗?谢谢
我有一个问题,我的xml-da客户端正在使用zsi 2.2.2库生成看起来像soap 1.2消息的消息,因为我可以看到这一行.
xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"
Run Code Online (Sandbox Code Playgroud)
但我也可以在标题中看到text/xml作为内容类型.我在soap 1.2中找不到任何标题应该是什么样的概念,但我认为它应该是application/soap-xml.
那它究竟应该是什么?
有没有办法在ZSI,Python中的SOAP请求中添加wsse:Security,UsernameToken标头?我在网上搜索,但找不到答案.
我知道suds是为了客户端,但我也想用它来制作服务器站点,以摆脱ZSI.
我如何使用suds来解析soap请求而不是响应?
[更新]