Hi Stefan,
Firstly, you seem to have some typos as far as uppercase vs. lowercase goes, in the code you attached above, for instance:
mediaEntry.Name = asset.Value.Title;
Should be:
mediaEntry.name = asset.Value.Title ;
Also, mediaEntry.searchProviderType cannot be updated, but, not sure why you need to update it?
Below is a full example of a class that updates the name, description, category IDs and tags, in the example, the values are hard coded in the code just to make it as simple as possible but of course you need to change that.
import com.kaltura.client.enums.*;
import com.kaltura.client.types.*;
import com.kaltura.client.services.*;
import com.kaltura.client.KalturaApiException;
import com.kaltura.client.KalturaClient;
import com.kaltura.client.KalturaConfiguration;
import chunkedupload.ChunkedUpload;
public class UpdateEntry {
public static void main(String[] argv){
try{
if (argv.length < 4){
System.out.println("Usage: <service URL> <partner ID> <partner admin secret> <entryId>\n");
System.exit (1);
}
try{
KalturaConfiguration config = new KalturaConfiguration();
config.setEndpoint(argv[0]);
KalturaClient client = new KalturaClient(config);
String secret = argv[2];
String userId = null;
int partnerId = Integer.parseInt(argv[1]);
String privileges = null;
KalturaSessionService sessionService = client.getSessionService();
String ks = client.generateSessionV2(secret, null, KalturaSessionType.USER, partnerId, 86400, "");
// comment the call to generateSessionV2() and uncomment the 2 lines below when working with older Kaltura server versions:
//String ks = client.generateSession(secret, "v2o", KalturaSessionType.ADMIN, partnerId);
client.setSessionId(ks);
System.out.println(ks);
String entryId = argv[3];
KalturaMediaEntry mediaEntry = new KalturaMediaEntry();
mediaEntry.name = "blah";
mediaEntry.description = "blah blah";
mediaEntry.tags = "aha";
mediaEntry.categoriesIds = "705,700";
Object result = client.getMediaService().update(entryId, mediaEntry);
} catch (KalturaApiException e) {
e.printStackTrace();
}
} catch (Exception exc) {
exc.printStackTrace();
}
}
}
You can compile it from the command line by using:
$ javac -cp .:KalturaClient-3.3.1.jar:httpclient-4.2.3.jar:commons-httpclient-3.1.jar:log4j-1.2.15.jar:json-20090211.jar UpdateEntry.java
And then run it with:
$ java -cp .:KalturaClient-3.3.1.jar:httpclient-4.2.3.jar:commons-httpclient-3.1.jar:log4j-1.2.15.jar:json-20090211.jar:commons-codec-1.6.jar:commons-logging-1.1.1.jar UpdateEntry <service URL> <partner ID> <partner admin secret> <entryId>
For SaaS, service URL should be https://www.kaltura.com, if it is self hosted then you should provide your own endpoint.