Hi,
I am trying to add a Group to a Community using this peace of code in jsp:
==============================
GenericAction action = new GenericAction("SetCommunityRoles");
SimpleActionData data = new SimpleActionData();
data.addParam("readers", "1.60.6901");
data.addParam("readers", "1.60.4303");
data.addParam("domainid", "default_domain");
data.addParam("object", "1.112.1401");
data.addParam("authrealm", "prodesp");
//CommunityDataServiceIf dservice = CommunityDataServiceFactory.getInstance().createCommunityDataService("CommunityServer1", "admin", "admin");
CommunityDataServiceIf dservice = CommunityDataServiceFactory.getInstance().createCommunityDataService("CommunityServer1", "prodesp", "admin", "admin");
Response cresponse = dservice.execute(action, data);
if (cresponse != null) {
out.println("response code: " + cresponse.getResponseCode());
out.println(" - ");
out.println(cresponse.getData());
}
=================
Where this part are the Groups:
data.addParam("readers", "1.60.6901");
data.addParam("readers", "1.60.4303");
and this Object is My Community:
data.addParam("domainid", "default_domain");
data.addParam("object", "1.112.1401");
==================
However this code didnt work, returning code 301.
Could you tell if I am in the right way? What is wrong?
thanks in advance,
Paulo.