什么是可用于创建SOAP服务器的最佳库 - 使用Python的客户端或实现可与SOAP服务器通信的客户端???
如何使用"choice"参数生成对方法的请求?
wsdl的一部分在http://127.0.0.1/service?wsdl:
<xs:complexType name="ByA"> <xs:sequence> ... </xs:sequence> </xs:complexType> <xs:complexType name="ByB"> <xs:sequence> ... </xs:sequence> </xs:complexType> <xs:complexType name="GetMethodRequest"> <xs:choice> <xs:element name="byA" type="s0:ByA" /> <xs:element name="byB" type="s0:ByB" /> </xs:choice> </xs:complexType>
当我做
Run Code Online (Sandbox Code Playgroud)
from suds.client import Client
client = Client("http://127.0.0.1/service?wsdl")
print client
我知道了
GetMethod()
没有任何论据.
如何用byA或byB调用GetMethod?
我从我的Python代码中调用web服务:
response = subprocess.call(['curl', '-k', '-i', '-H' , 'content-type: application/soap+xml' ,'-d', etree.tostring(tree), '-v' ,'https://world-service-dev.intra.aexp.com:4414/worldservice/CLIC/CaseManagementService/V1'])
Run Code Online (Sandbox Code Playgroud)
该服务返回一条soap消息,如何解析soap消息并查明它是失败还是成功?
我尝试使用以下内容,但结果错误:
subprocess.check_output("curl -k --data "+etree.tostring(tree)+"@SampleRequest.xml -v https://world-service-dev.intra.aexp.com:4414/worldservice/CLIC/CaseManagementService/V1",stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
Run Code Online (Sandbox Code Playgroud)