Package org.pentaho.platform.security.userrole.ws

Examples of org.pentaho.platform.security.userrole.ws.IUserRoleListWebService


    System.setProperty( "com.sun.xml.ws.monitoring.registrationDebug", "FINE" );
    System.setProperty( "com.sun.xml.ws.monitoring.runtimeDebug", "true" );
    Service service =
        Service.create( new URL( "http://localhost:8080/pentaho/webservices/userRoleListService?wsdl" ), new QName(
            "http://www.pentaho.org/ws/1.0", "userRoleListService" ) );
    IUserRoleListWebService userDetailsRoleListWebService = service.getPort( IUserRoleListWebService.class );
    ( (BindingProvider) userDetailsRoleListWebService ).getRequestContext().put( BindingProvider.USERNAME_PROPERTY,
        "admin" );
    ( (BindingProvider) userDetailsRoleListWebService ).getRequestContext().put( BindingProvider.PASSWORD_PROPERTY,
        "password" );
    // accept cookies to maintain session on server
View Full Code Here


    return new DefaultUserRoleListWebService();
  }

  @Test
  public void testGetAllRoles() throws Exception {
    IUserRoleListWebService service = getUserRoleListWebService();

    try {
      List<String> allRoles = service.getAllRoles();
      assertNotNull( allRoles );
      assertEquals( allRoles.size(), 7 ); // Should have exactly 7 roles
      assertEquals( allRoles.get( 0 ), "dev" ); //$NON-NLS-1$
      assertEquals( allRoles.get( 6 ), "is" ); //$NON-NLS-1$
View Full Code Here

    }
  }

  @Test
  public void testGetAllUsers() throws Exception {
    IUserRoleListWebService service = getUserRoleListWebService();

    try {
      List<String> allUsers = service.getAllUsers();
      assertNotNull( allUsers );
      assertEquals( allUsers.size(), 4 );
      assertEquals( allUsers.get( 0 ), "pat" ); //$NON-NLS-1$
      assertEquals( allUsers.get( 3 ), "suzy" ); //$NON-NLS-1$
View Full Code Here

    }
  }

  @Test
  public void testGetUserRoleInfo() throws Exception {
    IUserRoleListWebService service = getUserRoleListWebService();

    try {

      UserRoleInfo userRoleInfo = service.getUserRoleInfo(); //$NON-NLS-1$
      assertNotNull( userRoleInfo );
      assertEquals( userRoleInfo.getRoles().size(), 7 );
      assertEquals( userRoleInfo.getUsers().size(), 4 );
    } catch ( Exception e ) {
      Assert.fail();
View Full Code Here

TOP

Related Classes of org.pentaho.platform.security.userrole.ws.IUserRoleListWebService

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.