我有一個名爲newSettings
arrayofstrings字段的SOAP webservice,我試圖發送它作爲正常的字符串數組使用nusoap,但它不工作,任何建議?發送arryofstring與php + nusoap
我的代碼:
$settings=array('password','composefontsize');
$param=array(
'EmailAddress'=> $userEmail,
'newSettings' => $settings
);
$response=$this->client->call("GetRequestedUserSettings",$param);
我的XML請求:
<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns6388="http://tempuri.org">
<SOAP-ENV:Body><GetRequestedUserSettings xmlns="http://tempuri.org/">
<AuthUserName>admin</AuthUserName>
<AuthPassword>XXXX</AuthPassword>
<EmailAddress>[email protected]</EmailAddress>
<requestedSettings></requestedSettings>
</GetRequestedUserSettings>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>"
更新:我$settings = array('string' => $value1,...)
固定它;
該解決方案應該作爲答案,以便您可以接受它。 :) – Alfabravo 2017-06-12 18:21:01