Hi there,
I am trying to set the asset metadata as following by using JS api via soap server.
The script can run through successfully without error, however the asset metadata was not changed.
Tried to add RegenerateMetadataAsset, still not luck. Am I missing anything?
Thanks.
<script type="text/javascript" src="http://SYSTEM_ROOT_URL/__data/asset_types/soap_api/web_services_caller.js"></script>
<script type="text/javascript">
var current_system_root = 'SYSTEM_ROOT_URL';//(e.g http://yourserver.com);
include_service_lib('asset', current_system_root);
include_service_lib('metadata', current_system_root);
</script>
<script type="text/javascript">
function TosetAssetMetadata(assetid, fieldid, newvalue)
{
var location = 'http://SYSTEM_ROOT_URL/_web_services/soap-server';
var wsdl = 'http://SYSTEM_ROOT_URL/_web_services/soap-server?WSDL';
var soapBody = SetAssetMetadata(assetid, fieldid, newvalue);
var soapRequest = constructSOAPRequest(soapBody, location);
send(wsdl, soapRequest, 'getSetAssetMetadataResponse');
}//end SetAssetMetadata ()
function getSetAssetMetadataResponse(response)
{
alert('successfully');
}//end
</script>