public ServerRoleManagerClient( ConfigurationContext configCtx, String backendServerURL, String cookie) throws java.lang.Exception { String serviceURL = backendServerURL + "ServerRolesManager"; stub = new ServerRolesManagerStub(configCtx, serviceURL); ServiceClient client = stub._getServiceClient(); Options options = client.getOptions(); options.setManageSession(true); options.setProperty(org.apache.axis2.transport.http.HTTPConstants.COOKIE_STRING, cookie); }
public String[] getServerRoles(String serverRoleType) throws java.lang.Exception { String[] serverRoles = new String[] {}; try { serverRoles = stub.readServerRoles(serverRoleType); } catch (RemoteException e) { this.handleException(e.getMessage(), e); } catch (ReadServerRolesServerRolesExceptionException e) { this.handleException(e.getMessage(), e); } return serverRoles; }
public boolean addServerRoles(String[] serverRolestoAdd, String serverRoleType) throws java.lang.Exception { boolean status = false; try { status = stub.addServerRoles(serverRolestoAdd, serverRoleType); } catch (RemoteException e) { this.handleException(e.getMessage(), e); } catch (AddServerRolesServerRolesExceptionException e) { this.handleException(e.getMessage(), e); } return status; }