用python客户端调用SOAP服务

2024-10-02 00:20:12 发布

您现在位置:Python中文网/ 问答频道 /正文

请帮助我解决python客户端的问题。我想从我的SOAP服务得到一个回复,写在C#上。当我尝试在浏览器中测试服务时,它工作正常,但当我开始使用简单的python客户机时,出现了问题

from pysimplesoap.client import SoapClient

# create a simple consumer
client = SoapClient(
    location = "http://localhost:1906/AbitService.asmx/",
    action = "http://localhost:1906/AbitService.asmx/GetAbitReports",
    soap_ns='soap',
    trace = True,
    ns = False)

# call the remote method
response = client.GetAbitReports ()

# extract and convert the returned value
result = response.AddResult
print result

我的魅力告诉我

请求格式无法识别,因为URL意外结束于";/"

我做错了什么?任何帮助都将不胜感激


Tags: theclientlocalhosthttp客户端response浏览器result

热门问题