1
所以這裏是我的PHP代碼將簡單的SOAP客戶端代碼從PHP到Python
$client = new SoapClient('https://someservice.com/Tokens.xml', array('soap_version' => SOAP_1_1));
$params['merchantId'] = 'ABC';
$params['invoiceNo'] = 1;
$result = $client->__soapCall("MakeToken", array($params));
$token = $result->MakeTokenResult->token;
,所以我已經安裝了肥皂水 ,我已經來到這麼遠
from suds.client import Client
def test(request):
client = Client(location="https://someservice.com/Tokens.xml")
return(HttpResponse('something !! '))
林不知道下一步是在這一行
$result = $client->__soapCall("MakeToken", array($params));
這是我想出了哪些是顯而易見的錯誤!
client.service.__soapCall('MakeToken' , 'merchantId:ABC' , 'invoiceNo:1')