Я пытаюсь подписать пользователя на службу Adobe Campaign, но, хотя я жестко программирую параметры получателя, в ответах говорится:
"Cannot update. The key used to identified the recipient is empty."
Вот мой код PHP:
public function subscribe()
{
$this->soapSubscribe = new SoapClient(ROOT .'/schemas/subscription.wsdl', array('trace' => 1));
$xml = <<<EOM
<recipient _key="email, firstName, [folder-id]" _operation="insertOrUpdate" email="dave@gmail.com" firstName="David" lastName="Smith" company="MyCompany" position="Project Manager" origin="Websitelong" folder-id="7053039">
<folder _operation="none" name="Folder49"/>
</recipient>
EOM;
$params = array(
'sessiontoken' => $this->sessionToken,
'strServiceName' => "New_Service",
'elemRecipient'=> new SoapVar($xml, XSD_ANYXML),
'bCreate' => true
);
try {
if ($this->soapSubscribe->Subscribe($params)) {
return true;
}
} catch (SoapFault $fault) {
var_dump($fault);
return false;
}
return false;
}
И реакция на ошибку SOAP:
["previous":"Exception":private]=>
NULL
["faultstring"]=>
string(75) "Error while executing the method 'Subscribe' of service 'nms:subscription'."
["faultcode"]=>
string(15) "SOAP-ENV:Server"
["detail"]=>
string(65) "Cannot update. The key used to identified the recipient is empty."
Может кто-нибудь определить какие-либо проблемы, которые могут быть причиной этой ошибки?