I can get association information using the web service, but I can't seem to update or delete associations. Here is the code I am trying in php:
$auxPlaceholderAssoc = MBAsset::getAssociatedAssetMetadata($assetId,
MBAssociation::GetAssociation('Has collections data')->mID);
$auxPlaceholderId = $auxPlaceholderAssoc->mValues->anyType;
// Add the image as the primary to this placeholder
$primAssoc = new MBMetadata();
$primAssoc->mName = 'Is primary image';
$primAssoc->mID = MBAssociation::GetAssociation('Is primary image')->mID;
$primAssoc->IsMultipleValue = 1;
$primAssoc->mValues->anyType[] = $auxPlaceholderId;
$primAssoc->mFormat->mType = 'StringChoice';
$primAssoc->mFormat->mMaxStringLen = strlen($auxPlaceholderId);
$req = new stdClass();
$req->ReviseAssetMetadata->assetID = $assetId;
$req->ReviseAssetMetadata->metadataArray->MBMetadata[] = $primAssoc;
$resp = MBClientFactory::getMediaBinClient()->__soapCall('ReviseAssetMetadata', (array)$req);
and it yields the error:
Server was unable to process request. --> MBException: The type must match the original. (0x80040449)
The associations are not returned as part of the "GetEditableMetadata" request.
Thanks,