我的SOAP网址为202.46.201.237:82/MobilityService.svc?wsdl
这是我的代码:
from suds.client import Client
url_service = 'http://202.46.201.237:82/MobilityService.svc?wsdl'
client = Client(url_service,headers={'Content-Type': 'application/soap+xml', 'charset': 'utf-8'})
print client
Suds ( https://fedorahosted.org/suds/ ) version: 0.4 GA build: R699-20100913
Service ( MobilityService ) tns="http://tempuri.org/"
Prefixes (3)
ns0 = "http://schemas.datacontract.org/2004/07/Models"
ns1 = "http://schemas.microsoft.com/2003/10/Serialization/"
ns2 = "http://tempuri.org/"
Ports (1):
(WSHttpBinding_IMobilityService)
Methods (1):
AddNomineeDetails(ns0:WebServiceInputView WebServiceInputView, )
Types (4):
ns0:WebServiceInputView
ns1:char
ns1:duration
ns1:guid
result = client.factory.create('ns0:WebServiceInputView')
result.MessageText = 'test'
result.MobileNo = '1234'
result = client.service.AddNomineeDetails(result)
我收到Bad Request Exception: (400, u'Bad Request')
错误。我该如何解决这个问题?