我有一个带有 arrayofstrings 字段的 SOAP 网络服务newSettings
,我正在尝试使用 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>xxx@xxx</EmailAddress>
<requestedSettings></requestedSettings>
</GetRequestedUserSettings>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>"
更新:我用$settings = array('string' => $value1,...)
;