0
я хочу создать запрос мыла, как показано нижесоздать запрос SOAP PHP
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/10.0">
<soapenv:Header/>
<soapenv:Body>
<ns:updateUser sequence="?">
<!--You have a CHOICE of the next 2 items at this level-->
<uuid>{74932749237942794729473927493829}</uuid>
<userid>?</userid>
<associatedGroups>
<!--Zero or more repetitions:-->
<userGroup>
<name>Standard CTI Enabled</name>
<!--Optional:-->
<userRoles>
<!--Zero or more repetitions:-->
<userRole>Standard CTI Enabled</userRole>
</userRoles>
</userGroup>
<userGroup>
<name>Standard CCM End Users</name>
<!--Optional:-->
<userRoles>
<!--Zero or more repetitions:-->
<userRole>Standard CCM End Users</userRole>
</userRoles>
</userGroup>
</associatedGroups>
</ns:updateUser>
</soapenv:Body>
</soapenv:Envelope>
У меня есть это как мой код до сих пор:
$userId = "[email protected]";
$retAccessWebex["UserUuid"] = "{74932749237942794729473927493829}"; //sample userUuid
$userGroup = array();
$userRoleCTI = array("Standard CTI Enabled");
$userGroup[] = array(
"name" => "Standard CTI Enabled",
"userRoles" => array(
"userRole" => $userRoleCTI,
)
);
$userRoleCCM = array("Standard CCM End Users");
$userGroup[] = array(
"name" => "Standard CCM End Users",
"userRoles" => array(
"userRole" => $userRoleCCM,
)
);
$param = array(
"uuid" => $retAccessWebex["UserUuid"],
"userid" => $userId,
"associatedGroups" => array(
array(
"userGroup" => $userGroup,
)
)
);
$mywsdl = "pathToSchemaWsdl/AXLAPI.wsdl";
$wsdl = "https://127.0.0.1:8443/axl/";
$client = new SoapClient($mywsdl,
array('trace' => true,
'exceptions' => true,
'location' => $wsdl,
'login' => 'administrator',
'password' => 'mtp455w0rd',
));
$response = $client->updateUser($param);
однако, при выполнении, я получаю сообщение об ошибке:
Fatal error: Uncaught SoapFault exception: [Sender] SOAP-ERROR: Encoding: object has no 'name' property
Я попытался использовать этот код, но запрос на мыло все еще не отображается. Я предположил, что сервер не смог построить запрос soap с параметром массива, который я дал –