How to get users in my webmethods server 7.1

Dear All,

I want to get all users in my webMethods server 7.1. i get a wsdl from Folders > System > Managers > bizPolicy > dir > user on mws, and creat ws connectors by the wsdl, when i try to run the connecotr “getmembers”, i get the following error msg. may bacause of incorrect input, how to prepare the input for getmembers. Thanks a lot.

com.webMethods.portal.bizPolicy.BizException: [POP.001.0002] A “java.lang.NullPointerException” occurred with the Message “at com.webMethods.portal.bizPolicy.command.dir.GetMembers._getMembers(GetMembers.java:115)”

You need to use listPrincipals instead of getMembers. In portlets javacode it looks like

com.webMethods.portal.bizPolicy.IContext context = com.webMethods.portal.bizPolicy.impl.ContextFactory
.acquireContext(true);
IBizPolicyManager bpm = (IBizPolicyManager) PortalSystem
.getBizPolicyProvider();
IDirSystemBizPolicy dirSystemPolicy = (IDirSystemBizPolicy) bpm
.getBizPolicy(IBizPolicyNames.DIRECTORY_SYSTEM);
IDirServiceBizPolicy dirServicePolicy = (IDirServiceBizPolicy) bpm
.getBizPolicy(IBizPolicyNames.DIRECTORY_SERVICE);
IThingID dirServiceID = (IThingID) PortalSystem.getPortalSystem()
.acquireURI(“system.directory.service”);
IDirPrincipalList zzz = (IDirPrincipalList) dirServicePolicy
.listPrincipals(context, dirServiceID, IDirSystem.TYPE_USER,
0,-1);

Hi,
I am trying to use the following code but I got “com.wm.app.b2b.server.ServiceException: java.lang.NullPointerException”

com.webMethods.portal.bizPolicy.IContext context = com.webMethods.portal.bizPolicy.impl.ContextFactory
.acquireContext(true);

can anyone tell me how to solve this error?

thanks in advance!