Creating MwS Roles and Assigning Users to Roles through APIs

All,

I am looking for APIs to create MwS roles and assign users to those roles through MwS APIs, i want to provide this facility to my application users for performing this activity.

I am using webMethods 7.0 SP2.

I will really appreciate if anyone can help me out in this by providing API references or portlet references through which i can acheive this functionality.

Thanks.

Khurram

Please use following code example

import com.webMethods.portal.bizPolicy.IContext;
import com.webMethods.portal.bizPolicy.biz.IBizPolicyManager;
import com.webMethods.portal.bizPolicy.biz.IBizPolicyNames;
import com.webMethods.portal.bizPolicy.biz.dir.IDirServiceBizPolicy;
import com.webMethods.portal.bizPolicy.biz.dir.IDirSystemBizPolicy;
import com.webMethods.portal.bizPolicy.impl.ContextFactory;
import com.webMethods.portal.service.dir.IDirRole;
import com.webMethods.portal.service.dir.IDirSystem;
import com.webMethods.portal.service.dir.IDirUser;
import com.webMethods.portal.service.meta2.thing.IThingID;
import com.webMethods.portal.system.PortalSystem;

public class Test {