airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sma...@apache.org
Subject [1/4] airavata-php-gateway git commit: Wrapping Identitiy Server Code as a Laravel package
Date Sun, 03 May 2015 12:28:46 GMT
Repository: airavata-php-gateway
Updated Branches:
  refs/heads/master 71079c5f4 -> e3fce17c2


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/2040a6d4/app/libraries/wsis_utilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/wsis_utilities.php b/app/libraries/wsis_utilities.php
index fbf90f8..530fa52 100755
--- a/app/libraries/wsis_utilities.php
+++ b/app/libraries/wsis_utilities.php
@@ -1,65 +1,12 @@
 <?php
 
 require_once 'id_utilities.php';
-require_once 'WSISClient.php';
-
-//$GLOBALS['WSIS_ROOT'] = './lib/WSIS/';
-//require_once $GLOBALS['WSIS_ROOT'] . 'WSISClient.php';
 
 /**
  * Utilities for ID management with a WSO2 IS 4.6.0
  */
 
 class WSISUtilities implements IdUtilities{
-    /**
-     * wso2 IS client
-     * 
-     * @var WSISClient
-     * @access private
-     */
-    private $wsis_client;
-
-    /**
-     * Connect to the identity store.
-     * @return mixed|void
-     */
-    public function connect() { 
-   
-        $wsis_config = Utilities::read_config();    
-        if(substr($wsis_config['service-url'], -1) !== "/"){
-            $wsis_config['service-url'] = $wsis_config['service-url'] . "/";
-        }
-        
-        if(!substr($wsis_config['cafile-path'], 0) !== "/"){
-            $wsis_config['cafile-path'] = "/" . $wsis_config['cafile-path'];
-        }
-        $wsis_config['cafile-path'] = app_path() . $wsis_config['cafile-path'];            
-        
-        /*
-        if( Session::has("username"))
-        {
-            $username = Session::get("username");
-            $password = Session::get("password");
-        }
-        else
-        {
-            $username = $_POST["username"];
-            $password = $_POST["password"];
-        }
-        */
-        $username = $wsis_config['admin-username'];
-        $password = $wsis_config['admin-password'];
-        
-        $this->wsis_client = new WSISClient(
-                $username,
-                $password,
-                $wsis_config['server'],
-                $wsis_config['service-url'],
-                $wsis_config['cafile-path'],
-                $wsis_config['verify-peer'],
-                $wsis_config['allow-self-signed']
-        );    
-    }
 
     /**
      * Return true if the given username exists in the identity server.
@@ -69,7 +16,7 @@ class WSISUtilities implements IdUtilities{
     public function username_exists($username) {
         try{
             //$this->wsis_client = new WSISClient( $username);
-            return $this->wsis_client->username_exists($username);
+            return WSIS::username_exists($username);
         } catch (Exception $ex) {
             print_r( $ex);
             throw new Exception("Unable to check whether username exists", 0, NULL);
@@ -85,7 +32,7 @@ class WSISUtilities implements IdUtilities{
      */
     public function authenticate($username, $password) {
         try{
-            return $this->wsis_client->authenticate($username, $password);
+            return WSIS::authenticate($username, $password);
         } catch (Exception $ex) {
             var_dump( $ex);
             throw new Exception("Unable to authenticate user", 0, NULL);
@@ -101,7 +48,7 @@ class WSISUtilities implements IdUtilities{
     public function add_user($username, $password, $first_name, $last_name, $email, $organization,
             $address, $country,$telephone, $mobile, $im, $url) {
         try{
-            $this->wsis_client->addUser($username, $password, $first_name . " " . $last_name);
+            WSIS::addUser($username, $password, $first_name . " " . $last_name);
         } catch (Exception $ex) {
             var_dump($ex);
             throw new Exception("Unable to add new user", 0, NULL);
@@ -195,7 +142,7 @@ class WSISUtilities implements IdUtilities{
      */
     public function isExistingRole( $roleName){
         try{
-            return $this->wsis_client->is_existing_role( $roleName);
+            return WSIS::is_existing_role( $roleName);
         } catch (Exception $ex) {
             var_dump($ex);
             throw new Exception("Unable to check if role exists.", 0, $ex);
@@ -209,7 +156,7 @@ class WSISUtilities implements IdUtilities{
      */
     public function addRole($roleName){
         try{
-            return $this->wsis_client->add_role( $roleName);
+            return WSIS::add_role( $roleName);
         } catch (Exception $ex) {
             var_dump( $ex);
             throw new Exception("Unable to add role.", 0, $ex);
@@ -225,7 +172,7 @@ class WSISUtilities implements IdUtilities{
      */
     public function deleteRole($roleName) {
         try {
-            $this->wsis_client->delete_role($roleName);
+            WSIS::delete_role($roleName);
         } catch (Exception $ex) {
             throw new Exception("Unable to delete role", 0, $ex);
         }
@@ -239,7 +186,7 @@ class WSISUtilities implements IdUtilities{
     public function getRoleNames()
     {
         try{
-            return $this->wsis_client->get_all_roles();
+            WSIS::get_all_roles();
         } catch (Exception $ex) {
             var_dump($ex);
             throw new Exception("Unable to get roles.", 0, NULL);
@@ -255,7 +202,7 @@ class WSISUtilities implements IdUtilities{
     public function getRoleListOfUser($username)
     {
         try{
-            return $this->wsis_client->get_user_roles( $username);
+            return WSIS::get_user_roles( $username);
         } catch (Exception $ex) {
             var_dump($ex);
             throw new Exception("Unable to get roles.", 0, NULL);
@@ -271,7 +218,7 @@ class WSISUtilities implements IdUtilities{
     public function getUserListOfRole($role)
     {
         try{
-            return $this->wsis_client->get_userlist_of_role( $role);
+            return WSIS::get_userlist_of_role( $role);
         } catch (Exception $ex) {
             var_dump( $ex); exit;
             throw new Exception("Unable to get users.", 0, NULL);
@@ -307,7 +254,7 @@ class WSISUtilities implements IdUtilities{
     public function updateRoleListOfUser($username, $roles)
     {
         try{
-            return $this->wsis_client->update_user_roles( $username, $roles);
+            return WSIS::update_user_roles( $username, $roles);
         } catch (Exception $ex) {
             var_dump($ex); exit;
             throw new Exception("Unable to update User roles.", 0, NULL);
@@ -326,7 +273,7 @@ class WSISUtilities implements IdUtilities{
      */
     public function listUsers(){
         try {
-            return $this->wsis_client->list_users();
+            return WSIS::list_users();
         } catch (Exception $ex) {
     
             throw new Exception( "Unable to list users", 0, $ex);
@@ -341,7 +288,7 @@ class WSISUtilities implements IdUtilities{
      */
     public function getTenantId(){
         try {
-            return $this->wsis_client->get_tenant_id();
+            return WSIS::get_tenant_id();
         } catch (Exception $ex) {
             var_dump( $ex->debug_message); 
             throw new Exception("Unable to get the Tenant Id.", 0, $ex);
@@ -355,10 +302,19 @@ class WSISUtilities implements IdUtilities{
     */
     public function createTenant( $inputs){
         try {
-            return $this->wsis_client->create_tenant( $inputs);
+            return WSIS::create_tenant( $inputs);
         } catch (Exception $ex) {
             var_dump( $ex); 
             //throw new Exception("Unable to create Tenant.", 0, $ex);
         }
     }
+
+    /**
+     * Connect to the user database.
+     * @return mixed|void
+     */
+    public function connect()
+    {
+        // TODO: Implement connect() method.
+    }
 }

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/2040a6d4/app/libraries/xml_id_utilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/xml_id_utilities.php b/app/libraries/xml_id_utilities.php
index 6b54767..0ba9760 100755
--- a/app/libraries/xml_id_utilities.php
+++ b/app/libraries/xml_id_utilities.php
@@ -249,4 +249,46 @@ class XmlIdUtilities implements IdUtilities
     {
         // TODO: Implement removeUserFromRole() method.
     }
+
+    /**
+     * Function to get the entire list of roles in the application
+     *
+     * @return mixed
+     */
+    public function getRoleNames()
+    {
+        // TODO: Implement getRoleNames() method.
+    }
+
+    /**
+     * Function to check whether a role is existing
+     *
+     * @param string $roleName
+     * @return IsExistingRoleResponse
+     */
+    public function isExistingRole($roleName)
+    {
+        // TODO: Implement isExistingRole() method.
+    }
+
+    /**
+     * Function to add new role by providing the role name.
+     *
+     * @param string $roleName
+     */
+    public function addRole($roleName)
+    {
+        // TODO: Implement addRole() method.
+    }
+
+    /**
+     * Function to update role list of user
+     *
+     * @param UpdateRoleListOfUser $parameters
+     * @return void
+     */
+    public function updateRoleListOfUser($username, $roles)
+    {
+        // TODO: Implement updateRoleListOfUser() method.
+    }
 }

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/2040a6d4/workbench/airavata/wsis/.gitignore
----------------------------------------------------------------------
diff --git a/workbench/airavata/wsis/.gitignore b/workbench/airavata/wsis/.gitignore
new file mode 100755
index 0000000..5826402
--- /dev/null
+++ b/workbench/airavata/wsis/.gitignore
@@ -0,0 +1,4 @@
+/vendor
+composer.phar
+composer.lock
+.DS_Store

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/2040a6d4/workbench/airavata/wsis/.travis.yml
----------------------------------------------------------------------
diff --git a/workbench/airavata/wsis/.travis.yml b/workbench/airavata/wsis/.travis.yml
new file mode 100755
index 0000000..f60bbe0
--- /dev/null
+++ b/workbench/airavata/wsis/.travis.yml
@@ -0,0 +1,13 @@
+language: php
+
+php:
+  - 5.4
+  - 5.5
+  - 5.6
+  - hhvm
+
+before_script:
+  - travis_retry composer self-update
+  - travis_retry composer install --prefer-source --no-interaction --dev
+
+script: phpunit

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/2040a6d4/workbench/airavata/wsis/composer.json
----------------------------------------------------------------------
diff --git a/workbench/airavata/wsis/composer.json b/workbench/airavata/wsis/composer.json
new file mode 100755
index 0000000..2af236e
--- /dev/null
+++ b/workbench/airavata/wsis/composer.json
@@ -0,0 +1,20 @@
+{
+    "name": "airavata/wsis",
+    "description": "",
+    "authors": [
+        {
+            "name": "Apache Airavata",
+            "email": "dev@airavata.apache.org"
+        }
+    ],
+    "require": {
+        "php": ">=5.4.0",
+        "illuminate/support": "4.2.*"
+    },
+    "autoload": {
+        "psr-0": {
+            "Airavata\\Wsis": "src/"
+        }
+    },
+    "minimum-stability": "stable"
+}

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/2040a6d4/workbench/airavata/wsis/phpunit.xml
----------------------------------------------------------------------
diff --git a/workbench/airavata/wsis/phpunit.xml b/workbench/airavata/wsis/phpunit.xml
new file mode 100755
index 0000000..3347b75
--- /dev/null
+++ b/workbench/airavata/wsis/phpunit.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<phpunit backupGlobals="false"
+         backupStaticAttributes="false"
+         bootstrap="vendor/autoload.php"
+         colors="true"
+         convertErrorsToExceptions="true"
+         convertNoticesToExceptions="true"
+         convertWarningsToExceptions="true"
+         processIsolation="false"
+         stopOnFailure="false"
+         syntaxCheck="false"
+>
+    <testsuites>
+        <testsuite name="Package Test Suite">
+            <directory suffix=".php">./tests/</directory>
+        </testsuite>
+    </testsuites>
+</phpunit>

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/2040a6d4/workbench/airavata/wsis/src/Airavata/Wsis/Facades/Wsis.php
----------------------------------------------------------------------
diff --git a/workbench/airavata/wsis/src/Airavata/Wsis/Facades/Wsis.php b/workbench/airavata/wsis/src/Airavata/Wsis/Facades/Wsis.php
new file mode 100755
index 0000000..d89bc7c
--- /dev/null
+++ b/workbench/airavata/wsis/src/Airavata/Wsis/Facades/Wsis.php
@@ -0,0 +1,16 @@
+<?php
+
+namespace Airavata\Wsis\Facades;
+
+use Illuminate\Support\Facades\Facade;
+
+class Wsis extends Facade {
+
+    /**
+     * Get the registered name of the component.
+     *
+     * @return string
+     */
+    protected static function getFacadeAccessor() { return 'wsis'; }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/2040a6d4/workbench/airavata/wsis/src/Airavata/Wsis/Stubs/TenantManager.php
----------------------------------------------------------------------
diff --git a/workbench/airavata/wsis/src/Airavata/Wsis/Stubs/TenantManager.php b/workbench/airavata/wsis/src/Airavata/Wsis/Stubs/TenantManager.php
new file mode 100755
index 0000000..90bcd3f
--- /dev/null
+++ b/workbench/airavata/wsis/src/Airavata/Wsis/Stubs/TenantManager.php
@@ -0,0 +1,139 @@
+<?php
+namespace Airavata\Wsis\Stubs;
+
+use Airavata\Wsis\Stubs\TenantMgtAdminStub;
+
+/**
+ * TenantManager class
+ * 
+ * This class provide an easy to use interface for
+ * WSO2 IS 5.0.0 TenantMgtAdmin service.
+ */
+class TenantManager {
+    /**
+     * @var TenantMgtAdminStub $serviceStub
+     * @access private
+     */
+    private $serviceStub;
+
+    public function __construct($server_url, $options) {
+        $this->serviceStub = new TenantMgtAdminStub(
+                $server_url . "TenantMgtAdminService?wsdl", $options
+        );
+    }
+    
+    /**
+     * Function to get the soap client
+     * 
+     * @return SoapClient
+     */
+    public function getSoapClient(){
+        return $this->serviceStub;
+    }
+
+    /**
+     * Method to retrieve all  tenant information. Some tenant information
+     * such as admin name are not returned by wso2 IS
+     * @return mixed
+     */
+    public function retrieveTenants(){
+        $parameters = new retrieveTenants();
+        return $this->serviceStub->retrieveTenants($parameters)->return;
+    }
+
+    /**
+     * Method to get tenant information giving tenant domain
+     * @param $domain domain of the tenant
+     * @return mixed
+     */
+    public function getTenant($domain){
+        $parameters = new getTenant();
+        $parameters->tenantDomain = $domain;
+        return $this->serviceStub->getTenant($parameters)->return;
+    }
+
+    /**
+     * Method to create a new tenant
+     * @param $active whether tenant active or not
+     * @param $adminUsername
+     * @param $adminPassword
+     * @param $email
+     * @param $firstName Admin's first name
+     * @param $lastName Admin's last name
+     * @param $tenantDomain
+     */
+    public function addTenant($active, $adminUsername, $adminPassword, $email,
+                              $firstName, $lastName, $tenantDomain){
+        $tenantInfoBean = new TenantInfoBean();
+        $tenantInfoBean->active = $active;
+        $tenantInfoBean->admin = $adminUsername;
+        $tenantInfoBean->adminPassword = $adminPassword;
+        $tenantInfoBean->email = $email;
+        $tenantInfoBean->firstName = $firstName;
+        $tenantInfoBean->lastName = $lastName;
+        $tenantInfoBean->tenantDomain = $tenantDomain;
+
+        $addTenant  = new addTenant();
+        $addTenant->tenantInfoBean = $tenantInfoBean;
+        $this->serviceStub->addTenant($addTenant);
+    }
+
+    /**
+     * Method to remove an existing tenant giving tenant domain
+     * @param $tenantDomain
+     */
+    public function deleteTenant($tenantDomain){
+        $parameters = new deleteTenant();
+        $parameters->tenantDomain = $tenantDomain;
+        $this->serviceStub->deleteTenant($parameters);
+    }
+
+    /**
+     * Method to activate a tenant
+     * @param $tenantDomain
+     */
+    public function activateTenant($tenantDomain){
+        $parameters = new activateTenant();
+        $parameters->tenantDomain = $tenantDomain;
+        $this->serviceStub->activateTenant($parameters);
+    }
+
+    /**
+     * Method to deactivate a tenant
+     * @param $tenantDomain
+     */
+    public function deactivateTenant($tenantDomain){
+        $parameters = new deactivateTenant();
+        $parameters->tenantDomain = $tenantDomain;
+        $this->serviceStub->deactivateTenant($parameters);
+    }
+
+    /**
+     * Method to update an existing tenant
+     * @param $tenantId
+     * @param $active
+     * @param $adminUsername
+     * @param $adminPassword
+     * @param $email
+     * @param $firstName
+     * @param $lastName
+     * @param $tenantDomain
+     */
+    public function updateTenant($tenantId, $active, $adminUsername, $adminPassword, $email,
+                              $firstName, $lastName, $tenantDomain){
+        $tenantInfoBean = new TenantInfoBean();
+        $tenantInfoBean->tenantId = $tenantId;
+        $tenantInfoBean->active = $active;
+        $tenantInfoBean->admin = $adminUsername;
+        $tenantInfoBean->adminPassword = $adminPassword;
+        $tenantInfoBean->email = $email;
+        $tenantInfoBean->firstName = $firstName;
+        $tenantInfoBean->lastName = $lastName;
+        $tenantInfoBean->tenantDomain = $tenantDomain;
+
+        $updateTenant  = new updateTenant();
+        $updateTenant->tenantInfoBean = $tenantInfoBean;
+        $this->serviceStub->updateTenant($updateTenant);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/2040a6d4/workbench/airavata/wsis/src/Airavata/Wsis/Stubs/TenantMgtAdminStub.php
----------------------------------------------------------------------
diff --git a/workbench/airavata/wsis/src/Airavata/Wsis/Stubs/TenantMgtAdminStub.php b/workbench/airavata/wsis/src/Airavata/Wsis/Stubs/TenantMgtAdminStub.php
new file mode 100755
index 0000000..70dca16
--- /dev/null
+++ b/workbench/airavata/wsis/src/Airavata/Wsis/Stubs/TenantMgtAdminStub.php
@@ -0,0 +1,306 @@
+<?php
+namespace Airavata\Wsis\Stubs;
+use SoapClient;
+/**
+ * This file contains the DTOs and the method stubs for
+ * WSO2 IS 5.0.0 TenantMgtAdmin service.
+ */
+class TenantMgtAdminServiceException {
+  public $TenantMgtAdminServiceException; // Exception
+}
+
+
+class deleteTenant {
+  public $tenantDomain; // string
+}
+
+class updateTenant {
+  public $tenantInfoBean; // TenantInfoBean
+}
+
+class addTenant {
+  public $tenantInfoBean; // TenantInfoBean
+}
+
+class addTenantResponse {
+  public $return; // string
+}
+
+class activateTenant {
+  public $tenantDomain; // string
+}
+
+class deactivateTenant {
+  public $tenantDomain; // string
+}
+
+class getTenant {
+  public $tenantDomain; // string
+}
+
+class getTenantResponse {
+  public $return; // TenantInfoBean
+}
+
+class retrievePaginatedTenants {
+  public $pageNumber; // int
+}
+
+class retrievePaginatedTenantsResponse {
+  public $return; // PaginatedTenantInfoBean
+}
+
+class retrieveTenants {
+}
+
+class retrieveTenantsResponse {
+  public $return; // TenantInfoBean
+}
+
+class retrievePartialSearchTenants {
+  public $domain; // string
+}
+
+class retrievePartialSearchTenantsResponse {
+  public $return; // TenantInfoBean
+}
+
+class addSkeletonTenant {
+  public $tenantInfoBean; // TenantInfoBean
+}
+
+class addSkeletonTenantResponse {
+  public $return; // string
+}
+
+class retrievePaginatedPartialSearchTenants {
+  public $domain; // string
+  public $pageNumber; // int
+}
+
+class retrievePaginatedPartialSearchTenantsResponse {
+  public $return; // PaginatedTenantInfoBean
+}
+
+class TenantInfoBean {
+  public $active; // boolean
+  public $admin; // string
+  public $adminPassword; // string
+  public $createdDate; // dateTime
+  public $email; // string
+  public $firstname; // string
+  public $lastname; // string
+  public $originatedService; // string
+  public $successKey; // string
+  public $tenantDomain; // string
+  public $tenantId; // int
+  public $usagePlan; // string
+}
+
+class PaginatedTenantInfoBean {
+  public $numberOfPages; // int
+  public $tenantInfoBeans; // TenantInfoBean
+}
+
+
+/**
+ * TenantMgtAdminStub class
+ * 
+ *  
+ * 
+ * @author    {author}
+ * @copyright {copyright}
+ * @package   {package}
+ */
+class TenantMgtAdminStub extends SoapClient {
+
+  private static $classmap = array(
+                                    'TenantMgtAdminServiceException' => 'TenantMgtAdminServiceException',
+                                    'deleteTenant' => 'deleteTenant',
+                                    'updateTenant' => 'updateTenant',
+                                    'addTenant' => 'addTenant',
+                                    'addTenantResponse' => 'addTenantResponse',
+                                    'activateTenant' => 'activateTenant',
+                                    'deactivateTenant' => 'deactivateTenant',
+                                    'getTenant' => 'getTenant',
+                                    'getTenantResponse' => 'getTenantResponse',
+                                    'retrievePaginatedTenants' => 'retrievePaginatedTenants',
+                                    'retrievePaginatedTenantsResponse' => 'retrievePaginatedTenantsResponse',
+                                    'retrieveTenants' => 'retrieveTenants',
+                                    'retrieveTenantsResponse' => 'retrieveTenantsResponse',
+                                    'retrievePartialSearchTenants' => 'retrievePartialSearchTenants',
+                                    'retrievePartialSearchTenantsResponse' => 'retrievePartialSearchTenantsResponse',
+                                    'addSkeletonTenant' => 'addSkeletonTenant',
+                                    'addSkeletonTenantResponse' => 'addSkeletonTenantResponse',
+                                    'retrievePaginatedPartialSearchTenants' => 'retrievePaginatedPartialSearchTenants',
+                                    'retrievePaginatedPartialSearchTenantsResponse' => 'retrievePaginatedPartialSearchTenantsResponse',
+                                    'TenantInfoBean' => 'TenantInfoBean',
+                                    'PaginatedTenantInfoBean' => 'PaginatedTenantInfoBean',
+                                   );
+
+  public function TenantMgtAdminStub($wsdl, $options = array()) {
+    foreach(self::$classmap as $key => $value) {
+      if(!isset($options['classmap'][$key])) {
+        $options['classmap'][$key] = $value;
+      }
+    }
+    parent::__construct($wsdl, $options);
+  }
+
+  /**
+   *  
+   *
+   * @param retrieveTenants $parameters
+   * @return retrieveTenantsResponse
+   */
+  public function retrieveTenants(retrieveTenants $parameters) {
+    return $this->__soapCall('retrieveTenants', array($parameters),       array(
+            'uri' => 'http://services.mgt.tenant.carbon.wso2.org',
+            'soapaction' => ''
+           )
+      );
+  }
+
+  /**
+   *  
+   *
+   * @param getTenant $parameters
+   * @return getTenantResponse
+   */
+  public function getTenant(getTenant $parameters) {
+    return $this->__soapCall('getTenant', array($parameters),       array(
+            'uri' => 'http://services.mgt.tenant.carbon.wso2.org',
+            'soapaction' => ''
+           )
+      );
+  }
+
+  /**
+   *  
+   *
+   * @param deactivateTenant $parameters
+   * @return void
+   */
+  public function deactivateTenant(deactivateTenant $parameters) {
+    return $this->__soapCall('deactivateTenant', array($parameters),       array(
+            'uri' => 'http://services.mgt.tenant.carbon.wso2.org',
+            'soapaction' => ''
+           )
+      );
+  }
+
+  /**
+   *  
+   *
+   * @param retrievePartialSearchTenants $parameters
+   * @return retrievePartialSearchTenantsResponse
+   */
+  public function retrievePartialSearchTenants(retrievePartialSearchTenants $parameters) {
+    return $this->__soapCall('retrievePartialSearchTenants', array($parameters),       array(
+            'uri' => 'http://services.mgt.tenant.carbon.wso2.org',
+            'soapaction' => ''
+           )
+      );
+  }
+
+  /**
+   *  
+   *
+   * @param retrievePaginatedTenants $parameters
+   * @return retrievePaginatedTenantsResponse
+   */
+  public function retrievePaginatedTenants(retrievePaginatedTenants $parameters) {
+    return $this->__soapCall('retrievePaginatedTenants', array($parameters),       array(
+            'uri' => 'http://services.mgt.tenant.carbon.wso2.org',
+            'soapaction' => ''
+           )
+      );
+  }
+
+  /**
+   *  
+   *
+   * @param updateTenant $parameters
+   * @return void
+   */
+  public function updateTenant(updateTenant $parameters) {
+    return $this->__soapCall('updateTenant', array($parameters),       array(
+            'uri' => 'http://services.mgt.tenant.carbon.wso2.org',
+            'soapaction' => ''
+           )
+      );
+  }
+
+  /**
+   *  
+   *
+   * @param addSkeletonTenant $parameters
+   * @return addSkeletonTenantResponse
+   */
+  public function addSkeletonTenant(addSkeletonTenant $parameters) {
+    return $this->__soapCall('addSkeletonTenant', array($parameters),       array(
+            'uri' => 'http://services.mgt.tenant.carbon.wso2.org',
+            'soapaction' => ''
+           )
+      );
+  }
+
+  /**
+   *  
+   *
+   * @param addTenant $parameters
+   * @return addTenantResponse
+   */
+  public function addTenant(addTenant $parameters) {
+    return $this->__soapCall('addTenant', array($parameters),       array(
+            'uri' => 'http://services.mgt.tenant.carbon.wso2.org',
+            'soapaction' => ''
+           )
+      );
+  }
+
+  /**
+   *  
+   *
+   * @param retrievePaginatedPartialSearchTenants $parameters
+   * @return retrievePaginatedPartialSearchTenantsResponse
+   */
+  public function retrievePaginatedPartialSearchTenants(retrievePaginatedPartialSearchTenants $parameters) {
+    return $this->__soapCall('retrievePaginatedPartialSearchTenants', array($parameters),       array(
+            'uri' => 'http://services.mgt.tenant.carbon.wso2.org',
+            'soapaction' => ''
+           )
+      );
+  }
+
+  /**
+   *  
+   *
+   * @param activateTenant $parameters
+   * @return void
+   */
+  public function activateTenant(activateTenant $parameters) {
+    return $this->__soapCall('activateTenant', array($parameters),       array(
+            'uri' => 'http://services.mgt.tenant.carbon.wso2.org',
+            'soapaction' => ''
+           )
+      );
+  }
+
+  /**
+   *  
+   *
+   * @param deleteTenant $parameters
+   * @return void
+   */
+  public function deleteTenant(deleteTenant $parameters) {
+    return $this->__soapCall('deleteTenant', array($parameters),       array(
+            'uri' => 'http://services.mgt.tenant.carbon.wso2.org',
+            'soapaction' => ''
+           )
+      );
+  }
+
+}
+
+?>

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/2040a6d4/workbench/airavata/wsis/src/Airavata/Wsis/Stubs/UserStoreManager.php
----------------------------------------------------------------------
diff --git a/workbench/airavata/wsis/src/Airavata/Wsis/Stubs/UserStoreManager.php b/workbench/airavata/wsis/src/Airavata/Wsis/Stubs/UserStoreManager.php
new file mode 100755
index 0000000..b1b013e
--- /dev/null
+++ b/workbench/airavata/wsis/src/Airavata/Wsis/Stubs/UserStoreManager.php
@@ -0,0 +1,203 @@
+<?php
+namespace Airavata\Wsis\Stubs;
+
+use Airavata\Wsis\Stubs\UserStoreManagerStub;
+
+/**
+ * UsersStoreManager class
+ * 
+ * This class provide an easy to use interface for
+ * WSO2 IS 5.0.0 RemoteUserStoreManager service.
+ */
+class UserStoreManager {
+    /**
+     * @var RemoteUserManagerStub $serviceStub
+     * @access private
+     */
+    private $serviceStub;
+
+    public function __construct($server_url, $options) {
+        $this->serviceStub = new UserStoreManagerStub(
+                $server_url . "RemoteUserStoreManagerService?wsdl", $options
+        );
+    }
+    
+    /**
+     * Function to get the soap client
+     * 
+     * @return SoapClient
+     */
+    public function getSoapClient(){
+        return $this->serviceStub;
+    }
+    
+    /**
+     * Function to authenticate the user with RemoteUserStoreManager Service
+     * @param type $username
+     * @param type $password
+     */
+    public function authenticate($username, $password){
+        $parameters = new Authenticate();
+        $parameters->userName = $username;
+        $parameters->credential = $password;        
+        return $this->serviceStub->authenticate($parameters)->return;
+    }
+    
+    /**
+     * Function to add new user by providing username and password
+     * 
+     * @param type $userName
+     * @param type $password
+     */
+    public function addUser($userName, $password, $fullName){
+        $parameters = new AddUser();
+        $parameters->userName = $userName;
+        $parameters->credential = $password;
+        $parameters->claims = null;
+        $parameters->profileName = $fullName;
+        $parameters->requirePasswordChange = false;
+        $parameters->roleList = null;
+        $this->serviceStub->addUser($parameters);
+    }
+    /**
+     * Function to delete existing user by providing the username.
+     * 
+     * @param string $username
+     */
+    public function deleteUser($username){
+        $parameters = new DeleteUser();
+        $parameters->userName = $username;
+        $this->serviceStub->deleteUser($parameters);
+    }
+    
+    /**
+     * Function to check whether a role is existing 
+     *
+     * @param string $roleName 
+     * @return IsExistingRoleResponse
+     */
+    public function isExistingRole( $roleName) {
+        $parameters = new IsExistingRole();
+        $parameters->roleName = $roleName;
+        $this->serviceStub->isExistingRole( $parameters)->return;
+    }
+    /**
+     * Function to add new role by providing the role name.
+     * 
+     * @param string $roleName
+     */
+    public function addRole($roleName){
+        $paramerters = new AddRole();
+        $paramerters->roleName=$roleName;
+        $paramerters->userList=null;
+        $paramerters->permissions=null;
+        $this->serviceStub->addRole($paramerters);
+    }
+    
+    /**
+     * Function to delete an existing role
+     * 
+     * @param string $roleName
+     */
+    public function deleteRole($roleName){
+        $parameters = new DeleteRole();
+        $parameters->roleName = $roleName;
+        $this->serviceStub->deleteRole($parameters);
+    }
+    
+    /**
+     * Function to get a list of users
+     * 
+     * @return username list
+     */
+    public function listUsers(){
+        $parameters = new ListUsers();
+        $parameters->filter = "*";
+        $parameters->maxItemLimit = -1;
+        
+        return $this->serviceStub->listUsers($parameters)->return;
+    }
+
+     /**
+     * Function get user list
+     *
+     * @param GetUserList $parameters
+     * @return GetUserListResponse
+     */
+     public function getUserList(){
+        $parameters = new GetUserList();
+    }
+
+        
+    /**
+     * Function to check whether the given username already exists
+     * 
+     * @param string $username
+     * @return boolean
+     */
+    public function isExistingUser($username) {
+        $parameters = new IsExistingUser();
+        $parameters->userName = $username;
+        
+        return $this->serviceStub->isExistingUser($parameters)->return;
+    }
+
+    /**
+    * Function to get the list of all existing roles
+    *
+    * @return roles list
+    */
+    public function getRoleNames( $parameters = null){
+        $parameters = new GetRoleNames();
+        return $this->serviceStub->getRoleNames( $parameters)->return;
+    }
+
+    /**
+    * Function to get role of a user
+    *
+    * @return User Role
+    */
+    public function getRoleListOfUser( $username){
+        $parameters = new GetRoleListOfUser();
+        $parameters->userName = $username;
+        return $this->serviceStub->GetRoleListOfUser( $parameters)->return;
+    }
+
+    /**
+     * Function to get the user list of role
+     *
+     * @param GetUserListOfRole $parameters
+     * @return GetUserListOfRoleResponse
+     */
+    public function getUserListOfRole( $roleName){
+        $parameters = new GetUserListOfRole();
+        $parameters->roleName = $roleName;
+        return $this->serviceStub->getUserListOfRole( $parameters);
+    }
+    
+    /**
+     * Function to update role list of user 
+     *
+     * @param UpdateRoleListOfUser $parameters
+     * @return void
+     */
+    public function updateRoleListOfUser( $username, $roles){
+        $parameters = new UpdateRoleListOfUser();
+        $parameters->userName = $username;
+        $parameters->deletedRoles = $roles["deleted"];
+        $parameters->newRoles = $roles["new"];
+        return $this->serviceStub->updateRoleListOfUser( $parameters);
+    }
+
+    /**
+     * Function to get the tenant id
+     *
+     * @param GetTenantId $parameters
+     * @return GetTenantIdResponse
+     */
+    public function getTenantId(){
+        $parameters = new GetTenantId();
+
+        return $this->serviceStub->getTenantId( $parameters);
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/2040a6d4/workbench/airavata/wsis/src/Airavata/Wsis/Stubs/UserStoreManagerStub.php
----------------------------------------------------------------------
diff --git a/workbench/airavata/wsis/src/Airavata/Wsis/Stubs/UserStoreManagerStub.php b/workbench/airavata/wsis/src/Airavata/Wsis/Stubs/UserStoreManagerStub.php
new file mode 100755
index 0000000..c43fa48
--- /dev/null
+++ b/workbench/airavata/wsis/src/Airavata/Wsis/Stubs/UserStoreManagerStub.php
@@ -0,0 +1,1570 @@
+<?php
+namespace Airavata\Wsis\Stubs;
+use SoapClient;
+
+/**
+ * This file contains the DTOs and the method stubs for
+ * WSO2 IS 4.6.0 RemoteUserStoreManger service.
+ */
+
+class ClaimDTO {
+
+    /**
+     * @var string $claimUri
+     * @access public
+     */
+    public $claimUri;
+
+    /**
+     * @var string $description
+     * @access public
+     */
+    public $description;
+
+    /**
+     * @var string $dialectURI
+     * @access public
+     */
+    public $dialectURI;
+
+    /**
+     * @var int $displayOrder
+     * @access public
+     */
+    public $displayOrder;
+
+    /**
+     * @var string $displayTag
+     * @access public
+     */
+    public $displayTag;
+
+    /**
+     * @var string $regEx
+     * @access public
+     */
+    public $regEx;
+
+    /**
+     * @var boolean $required
+     * @access public
+     */
+    public $required;
+
+    /**
+     * @var boolean $supportedByDefault
+     * @access public
+     */
+    public $supportedByDefault;
+
+    /**
+     * @var string $value
+     * @access public
+     */
+    public $value;
+
+}
+
+class PermissionDTO {
+
+    /**
+     * @var string $action
+     * @access public
+     */
+    public $action;
+
+    /**
+     * @var string $resourceId
+     * @access public
+     */
+    public $resourceId;
+
+}
+
+class Tenant {
+
+    /**
+     * @var boolean $active
+     * @access public
+     */
+    public $active;
+
+    /**
+     * @var string $adminFirstName
+     * @access public
+     */
+    public $adminFirstName;
+
+    /**
+     * @var string $adminFullName
+     * @access public
+     */
+    public $adminFullName;
+
+    /**
+     * @var string $adminLastName
+     * @access public
+     */
+    public $adminLastName;
+
+    /**
+     * @var string $adminName
+     * @access public
+     */
+    public $adminName;
+
+    /**
+     * @var string $adminPassword
+     * @access public
+     */
+    public $adminPassword;
+
+    /**
+     * @var string $createdDate YYYY-MM-DD
+     * @access public
+     */
+    public $createdDate;
+
+    /**
+     * @var string $domain
+     * @access public
+     */
+    public $domain;
+
+    /**
+     * @var string $email
+     * @access public
+     */
+    public $email;
+
+    /**
+     * @var int $id
+     * @access public
+     */
+    public $id;
+
+    /**
+     * @var RealmConfiguration $realmConfig
+     * @access public
+     */
+    public $realmConfig;
+
+}
+
+class RealmConfiguration {
+
+    /**
+     * @var string $addAdmin
+     * @access public
+     */
+    public $addAdmin;
+
+    /**
+     * @var string $adminPassword
+     * @access public
+     */
+    public $adminPassword;
+
+    /**
+     * @var string $adminRoleName
+     * @access public
+     */
+    public $adminRoleName;
+
+    /**
+     * @var string $adminUserName
+     * @access public
+     */
+    public $adminUserName;
+
+    /**
+     * @var string $authorizationManagerClass
+     * @access public
+     */
+    public $authorizationManagerClass;
+
+    /**
+     * @var string $authzProperties
+     * @access public
+     */
+    public $authzProperties;
+
+    /**
+     * @var string $description
+     * @access public
+     */
+    public $description;
+
+    /**
+     * @var string $everyOneRoleName
+     * @access public
+     */
+    public $everyOneRoleName;
+
+    /**
+     * @var string $multipleCredentialProps
+     * @access public
+     */
+    public $multipleCredentialProps;
+
+    /**
+     * @var boolean $passwordsExternallyManaged
+     * @access public
+     */
+    public $passwordsExternallyManaged;
+
+    /**
+     * @var string $persistedTimestamp YYYY-MM-DD
+     * @access public
+     */
+    public $persistedTimestamp;
+
+    /**
+     * @var boolean $primary
+     * @access public
+     */
+    public $primary;
+
+    /**
+     * @var string $realmClassName
+     * @access public
+     */
+    public $realmClassName;
+
+    /**
+     * @var string $realmProperties
+     * @access public
+     */
+    public $realmProperties;
+
+    /**
+     * @var RealmConfiguration $secondaryRealmConfig
+     * @access public
+     */
+    public $secondaryRealmConfig;
+
+    /**
+     * @var int $tenantId
+     * @access public
+     */
+    public $tenantId;
+
+    /**
+     * @var string $userStoreClass
+     * @access public
+     */
+    public $userStoreClass;
+
+    /**
+     * @var string $userStoreProperties
+     * @access public
+     */
+    public $userStoreProperties;
+
+}
+
+class ClaimValue {
+
+    /**
+     * @var string $claimURI
+     * @access public
+     */
+    public $claimURI;
+
+    /**
+     * @var string $value
+     * @access public
+     */
+    public $value;
+
+}
+
+class AddUserClaimValues {
+
+    /**
+     * @var string $userName
+     * @access public
+     */
+    public $userName;
+
+    /**
+     * @var ClaimValue $claims
+     * @access public
+     */
+    public $claims;
+
+    /**
+     * @var string $profileName
+     * @access public
+     */
+    public $profileName;
+
+}
+
+class GetUserClaimValuesForClaims {
+
+    /**
+     * @var string $userName
+     * @access public
+     */
+    public $userName;
+
+    /**
+     * @var string $claims
+     * @access public
+     */
+    public $claims;
+
+    /**
+     * @var string $profileName
+     * @access public
+     */
+    public $profileName;
+
+}
+
+class GetUserClaimValuesForClaimsResponse {
+
+    /**
+     * @var ClaimValue $return
+     * @access public
+     */
+    public $return;
+
+}
+
+class GetTenantIdofUser {
+
+    /**
+     * @var string $userName
+     * @access public
+     */
+    public $username;
+
+}
+
+class GetTenantIdofUserResponse {
+
+    /**
+     * @var int $return
+     * @access public
+     */
+    public $return; // int
+
+}
+
+class AddUserClaimValue {
+
+    /**
+     * @var string $userName
+     * @access public
+     */
+    public $userName;
+
+    /**
+     * @var string $claimURI
+     * @access public
+     */
+    public $claimURI;
+
+    /**
+     * @var string $claimValue
+     * @access public
+     */
+    public $claimValue;
+
+    /**
+     * @var string $profileName
+     * @access public
+     */
+    public $profileName;
+
+}
+
+class GetUserClaimValues {
+
+    /**
+     * @var string $userName
+     * @access public
+     */
+    public $userName;
+
+    /**
+     * @var string $profileName
+     * @access public
+     */
+    public $profileName;
+
+}
+
+class GetUserClaimValuesResponse {
+
+    /**
+     * @var ClaimDTO $return
+     * @access public
+     */
+    public $return;
+
+}
+
+class GetTenantId {
+    
+}
+
+class GetTenantIdResponse {
+
+    /**
+     * @var int $return
+     * @access public
+     */
+    public $return;
+
+}
+
+class AddUser {
+
+    /**
+     * @var string $userName
+     * @access public
+     */
+    public $userName;
+
+    /**
+     * @var string $credential
+     * @access public
+     */
+    public $credential;
+
+    /**
+     * @var string $roleList
+     * @access public
+     */
+    public $roleList;
+
+    /**
+     * @var ClaimValue $claims
+     * @access public
+     */
+    public $claims;
+
+    /**
+     * @var string $profileName
+     * @access public
+     */
+    public $profileName;
+
+    /**
+     * @var boolean $requiredPasswordChange
+     * @access public
+     */
+    public $requirePasswordChange;
+
+}
+
+class AddRole {
+
+    /**
+     * @var string $roleName
+     * @access public
+     */
+    public $roleName;
+
+    /**
+     * @var string $userList
+     * @access public
+     */
+    public $userList;
+
+    /**
+     * @var PermissionDTO $permissions
+     * @access public
+     */
+    public $permissions;
+
+}
+
+class GetUserList {
+
+    /**
+     * @var string $claimUri
+     * @access public
+     */
+    public $claimUri;
+
+    /**
+     * @var string $claimValue
+     * @access public
+     */
+    public $claimValue;
+
+    /**
+     * @var string $profile
+     * @access public
+     */
+    public $profile;
+
+}
+
+class GetUserListResponse {
+
+    /**
+     * @var string $return
+     * @access public
+     */
+    public $return;
+
+}
+
+class UpdateCredential {
+
+    /**
+     * @var string $userName
+     * @access public
+     */
+    public $userName;
+
+    /**
+     * @var string $newCredential
+     * @access public
+     */
+    public $newCredential;
+
+    /**
+     * @var string $oldCredential
+     * @access public
+     */
+    public $oldCredential;
+
+}
+
+class UpdateUserListOfRole {
+
+    /**
+     * @var string $roleName
+     * @access public
+     */
+    public $roleName;
+
+    /**
+     * @var string $deletedUsers
+     * @access public
+     */
+    public $deletedUsers;
+
+    /**
+     * @var string $newUsers
+     * @access public
+     */
+    public $newUsers;
+
+}
+
+class UpdateRoleListOfUser {
+
+    /**
+     * @var string $userName
+     * @access public
+     */
+    public $userName;
+
+    /**
+     * @var string $deletedRoles
+     * @access public
+     */
+    public $deletedRoles;
+
+    /**
+     * @var string $newRoles
+     * @access public
+     */
+    public $newRoles;
+
+}
+
+class SetUserClaimValue {
+
+    /**
+     * @var string $userName
+     * @access public
+     */
+    public $userName;
+
+    /**
+     * @var string $claimURI
+     * @access public
+     */
+    public $claimURI;
+
+    /**
+     * @var string $claimValue
+     * @access public
+     */
+    public $claimValue;
+
+    /**
+     * @var string $profileName
+     * @access public
+     */
+    public $profileName;
+
+}
+
+class SetUserClaimValues {
+
+    /**
+     * @var string $userName
+     * @access public
+     */
+    public $userName;
+
+    /**
+     * @var ClaimValue $claims
+     * @access public
+     */
+    public $claims;
+
+    /**
+     * @var string $profileName
+     * @access public
+     */
+    public $profileName;
+
+}
+
+class DeleteUserClaimValue {
+
+    /**
+     * @var string $userName
+     * @access public
+     */
+    public $userName;
+
+    /**
+     * @var string $claimURI
+     * @access public
+     */
+    public $claimURI;
+
+    /**
+     * @var string $profileName
+     * @access public
+     */
+    public $profileName;
+
+}
+
+class DeleteUserClaimValues {
+
+    /**
+     * @var string $userName
+     * @access public
+     */
+    public $userName;
+
+    /**
+     * @var string $claims
+     * @access public
+     */
+    public $claims;
+
+    /**
+     * @var string $profileName
+     * @access public
+     */
+    public $profileName;
+
+}
+
+class GetHybridRoles {
+    
+}
+
+class GetHybridRolesResponse {
+
+    /**
+     * @var string $return
+     * @access public
+     */
+    public $return;
+
+}
+
+class GetPasswordExpirationTime {
+
+    /**
+     * @var string $username
+     * @access public
+     */
+    public $username;
+
+}
+
+class GetPasswordExpirationTimeResponse {
+
+    /**
+     * @var long $return
+     * @access public
+     */
+    public $return;
+
+}
+
+class UpdateRoleName {
+
+    /**
+     * @var string $roleName
+     * @access public
+     */
+    public $roleName;
+
+    /**
+     * @var string $newRoleName
+     * @access public
+     */
+    public $newRoleName;
+
+}
+
+class ListUsers {
+
+    /**
+     * @var string $filter
+     * @access public
+     */
+    public $filter;
+
+    /**
+     * @var int $maxItemLimit
+     * @access public
+     */
+    public $maxItemLimit;
+
+}
+
+class ListUsersResponse {
+
+    /**
+     * @var string $return
+     * @access public
+     */
+    public $return;
+
+}
+
+class IsExistingUser {
+
+    /**
+     * @var string $userName
+     * @access public
+     */
+    public $userName;
+
+}
+
+class IsExistingUserResponse {
+
+    /**
+     * @var boolean $return
+     * @access public
+     */
+    public $return;
+
+}
+
+class IsExistingRole {
+
+    /**
+     * @var string $roleName
+     * @access public
+     */
+    public $roleName;
+
+}
+
+class IsExistingRoleResponse {
+
+    /**
+     * @var boolean $return
+     * @access public
+     */
+    public $return;
+
+}
+
+class GetRoleNames {
+    
+}
+
+class GetRoleNamesResponse {
+
+    /**
+     * @var string $return
+     * @access public
+     */
+    public $return;
+
+}
+
+class GetProfileNames {
+
+    /**
+     * @var string $userName
+     * @access public
+     */
+    public $userName;
+
+}
+
+class GetProfileNamesResponse {
+
+    /**
+     * @var string $return
+     * @access public
+     */
+    public $return;
+
+}
+
+class GetUserListOfRole {
+
+    /**
+     * @var string $roleName
+     * @access public
+     */
+    public $roleName;
+
+}
+
+class GetUserListOfRoleResponse {
+
+    /**
+     * @var string $return
+     * @access public
+     */
+    public $return;
+
+}
+
+class GetUserClaimValue {
+
+    /**
+     * @var string $userName
+     * @access public
+     */
+    public $userName;
+
+    /**
+     * @var string $claim
+     * @access public
+     */
+    public $claim;
+
+    /**
+     * @var string $profileName
+     * @access public
+     */
+    public $profileName;
+
+}
+
+class GetUserClaimValueResponse {
+
+    /**
+     * @var string $return
+     * @access public
+     */
+    public $return;
+
+}
+
+class GetAllProfileNames {
+    
+}
+
+class GetAllProfileNamesResponse {
+
+    /**
+     * @var string $return
+     * @access public
+     */
+    public $return;
+
+}
+
+class UpdateCredentialByAdmin {
+
+    /**
+     * @var string $userName
+     * @access public
+     */
+    public $userName;
+
+    /**
+     * @var string $newCredential
+     * @access public
+     */
+    public $newCredential;
+
+}
+
+class DeleteUser {
+
+    /**
+     * @var string $userName
+     * @access public
+     */
+    public $userName;
+
+}
+
+class DeleteRole {
+
+    /**
+     * @var string $roleName
+     * @access public
+     */
+    public $roleName;
+
+}
+
+class GetUserId {
+
+    /**
+     * @var string $username
+     * @access public
+     */
+    public $username;
+
+}
+
+class GetUserIdResponse {
+
+    /**
+     * @var int $return
+     * @access public
+     */
+    public $return;
+
+}
+
+class GetRoleListOfUser {
+
+    /**
+     * @var string $userName
+     * @access public
+     */
+    public $userName;
+
+}
+
+class getRoleListOfUserResponse {
+
+    /**
+     * @var string $return
+     * @access public
+     */
+    public $return;
+
+}
+
+class GetProperties {
+
+    /**
+     * @var Tenant $tenant
+     * @access public
+     */
+    public $tenant;
+
+}
+
+class GetPropertiesResponse {
+
+    /**
+     * @var Array<string> $return
+     * @access public
+     */
+    public $return;
+
+}
+
+class IsReadOnly {
+    
+}
+
+class IsReadOnlyResponse {
+
+    /**
+     * @var boolean $return
+     * @access public
+     */
+    public $return;
+
+}
+
+class Authenticate {
+
+    /**
+     * @var string $userName
+     * @access public
+     */
+    public $userName;
+
+    /**
+     * @var string $credential
+     * @access public
+     */
+    public $credential;
+
+}
+
+class AuthenticateResponse {
+
+    /**
+     * @var boolean $return
+     * @access public
+     */
+    public $return;
+
+}
+
+class UserStoreException {
+    
+}
+
+/**
+ * UserStoreManagerService class
+ * 
+ */
+class UserStoreManagerStub extends SoapClient {
+
+    private static $classmap = array(
+        'ClaimDTO' => 'ClaimDTO',
+        'PermissionDTO' => 'PermissionDTO',
+        'Tenant' => 'Tenant',
+        'RealmConfiguration' => 'RealmConfiguration',
+        'ClaimValue' => 'ClaimValue',
+        'addUserClaimValues' => 'AddUserClaimValues',
+        'getUserClaimValuesForClaims' => 'GetUserClaimValuesForClaims',
+        'getUserClaimValuesForClaimsResponse' => 'GetUserClaimValuesForClaimsResponse',
+        'getTenantIdofUser' => 'GetTenantIdofUser',
+        'getTenantIdofUserResponse' => 'GetTenantIdofUserResponse',
+        'addUserClaimValue' => 'AddUserClaimValue',
+        'getUserClaimValues' => 'GetUserClaimValues',
+        'getUserClaimValuesResponse' => 'GetUserClaimValuesResponse',
+        'getTenantId' => 'GetTenantId',
+        'getTenantIdResponse' => 'GetTenantIdResponse',
+        'addUser' => 'AddUser',
+        'addRole' => 'AddRole',
+        'getUserList' => 'GetUserList',
+        'getUserListResponse' => 'GetUserListResponse',
+        'updateCredential' => 'UpdateCredential',
+        'updateUserListOfRole' => 'UpdateUserListOfRole',
+        'updateRoleListOfUser' => 'UpdateRoleListOfUser',
+        'setUserClaimValue' => 'SetUserClaimValue',
+        'setUserClaimValues' => 'SetUserClaimValues',
+        'deleteUserClaimValue' => 'DeleteUserClaimValue',
+        'deleteUserClaimValues' => 'DeleteUserClaimValues',
+        'getHybridRoles' => 'GetHybridRoles',
+        'getHybridRolesResponse' => 'GetHybridRolesResponse',
+        'getPasswordExpirationTime' => 'GetPasswordExpirationTime',
+        'getPasswordExpirationTimeResponse' => 'GetPasswordExpirationTimeResponse',
+        'updateRoleName' => 'UpdateRoleName',
+        'listUsers' => 'ListUsers',
+        'listUsersResponse' => 'ListUsersResponse',
+        'isExistingUser' => 'IsExistingUser',
+        'isExistingUserResponse' => 'IsExistingUserResponse',
+        'isExistingRole' => 'IsExistingRole',
+        'isExistingRoleResponse' => 'IsExistingRoleResponse',
+        'getRoleNames' => 'GetRoleNames',
+        'getRoleNamesResponse' => 'GetRoleNamesResponse',
+        'getProfileNames' => 'GetProfileNames',
+        'getProfileNamesResponse' => 'GetProfileNamesResponse',
+        'getUserListOfRole' => 'GetUserListOfRole',
+        'getUserListOfRoleResponse' => 'GetUserListOfRoleResponse',
+        'getUserClaimValue' => 'GetUserClaimValue',
+        'getUserClaimValueResponse' => 'GetUserClaimValueResponse',
+        'getAllProfileNames' => 'GetAllProfileNames',
+        'getAllProfileNamesResponse' => 'GetAllProfileNamesResponse',
+        'updateCredentialByAdmin' => 'UpdateCredentialByAdmin',
+        'deleteUser' => 'DeleteUser',
+        'deleteRole' => 'DeleteRole',
+        'getUserId' => 'GetUserId',
+        'getUserIdResponse' => 'GetUserIdResponse',
+        'getRoleListOfUser' => 'GetRoleListOfUser',
+        'getRoleListOfUserResponse' => 'GetRoleListOfUserResponse',
+        'getProperties' => 'GetProperties',
+        'getPropertiesResponse' => 'GetPropertiesResponse',
+        'isReadOnly' => 'IsReadOnly',
+        'isReadOnlyResponse' => 'IsReadOnlyResponse',
+        'authenticate' => 'Authenticate',
+        'authenticateResponse' => 'AuthenticateResponse',
+        'Tenant' => 'Tenant'
+    );
+
+    public function RemoteUserStoreManagerStub($wsdl, $options = array()) {
+        foreach (self::$classmap as $key => $value) {
+            if (!isset($options['classmap'][$key])) {
+                $options['classmap'][$key] = $value;
+            }
+        }
+        parent::__construct($wsdl, $options);
+    }
+
+    /**
+     * Function to authenticate 
+     *
+     * @param Authenticate $parameters
+     * @return AuthenticateResponse
+     */
+    public function authenticate(Authenticate $parameters) {
+        return $this->__soapCall('authenticate', array($parameters), array(
+                    'uri' => 'http://service.ws.um.carbon.wso2.org',
+                    'soapaction' => ''
+        ));
+    }
+
+    /**
+     * Function get user list
+     *
+     * @param GetUserList $parameters
+     * @return GetUserListResponse
+     */
+    public function getUserList(GetUserList $parameters) {
+        return $this->__soapCall('getUserList', array($parameters), array(
+                    'uri' => 'http://service.ws.um.carbon.wso2.org',
+                    'soapaction' => ''
+        ));
+    }
+
+    /**
+     * Function to get the user claim value
+     *
+     * @param GetUserClaimValue $parameters
+     * @return GetUserClaimValueResponse
+     */
+    public function getUserClaimValue(GetUserClaimValue $parameters) {
+        return $this->__soapCall('getUserClaimValue', array($parameters), array(
+                    'uri' => 'http://service.ws.um.carbon.wso2.org',
+                    'soapaction' => ''
+        ));
+    }
+
+    /**
+     * Function to get the user list of role
+     *
+     * @param GetUserListOfRole $parameters
+     * @return GetUserListOfRoleResponse
+     */
+    public function getUserListOfRole(GetUserListOfRole $parameters) {
+        return $this->__soapCall('getUserListOfRole', array($parameters), array(
+                    'uri' => 'http://service.ws.um.carbon.wso2.org',
+                    'soapaction' => ''
+        ));
+    }
+
+    /**
+     * Function to check whether the service is read only 
+     *
+     * @param IsReadOnly $parameters
+     * @return IsReadOnlyResponse
+     */
+    public function isReadOnly(IsReadOnly $parameters) {
+        return $this->__soapCall('isReadOnly', array($parameters), array(
+                    'uri' => 'http://service.ws.um.carbon.wso2.org',
+                    'soapaction' => ''
+        ));
+    }
+
+    /**
+     * Function to update the credentials
+     *
+     * @param UpdateCredential $parameters
+     * @return void
+     */
+    public function updateCredential(UpdateCredential $parameters) {
+        return $this->__soapCall('updateCredential', array($parameters), array(
+                    'uri' => 'http://service.ws.um.carbon.wso2.org',
+                    'soapaction' => ''
+        ));
+    }
+
+    /**
+     * Function to set user claim value 
+     *
+     * @param SetUserClaimValue $parameters
+     * @return void
+     */
+    public function setUserClaimValue(setUserClaimValue $parameters) {
+        return $this->__soapCall('setUserClaimValue', array($parameters), array(
+                    'uri' => 'http://service.ws.um.carbon.wso2.org',
+                    'soapaction' => ''
+        ));
+    }
+
+    /**
+     * Function to get the claim values for claims
+     *
+     * @param GetUserClaimValuesForClaims $parameters
+     * @return GetUserClaimValuesForClaimsResponse
+     */
+    public function getUserClaimValuesForClaims(GetUserClaimValuesForClaims $parameters) {
+        return $this->__soapCall('getUserClaimValuesForClaims', array($parameters), array(
+                    'uri' => 'http://service.ws.um.carbon.wso2.org',
+                    'soapaction' => ''
+        ));
+    }
+
+    /**
+     * Function to delete user claim values 
+     *
+     * @param DeleteUserClaimValues $parameters
+     * @return void
+     */
+    public function deleteUserClaimValues(DeleteUserClaimValues $parameters) {
+        return $this->__soapCall('deleteUserClaimValues', array($parameters), array(
+                    'uri' => 'http://service.ws.um.carbon.wso2.org',
+                    'soapaction' => ''
+        ));
+    }
+
+    /**
+     * Function to delete user claim value 
+     *
+     * @param DeleteUserClaimValue $parameters
+     * @return void
+     */
+    public function deleteUserClaimValue(DeleteUserClaimValue $parameters) {
+        return $this->__soapCall('deleteUserClaimValue', array($parameters), array(
+                    'uri' => 'http://service.ws.um.carbon.wso2.org',
+                    'soapaction' => ''
+        ));
+    }
+
+    /**
+     * Function to check whether use is existing 
+     *
+     * @param IsExistingUser $parameters
+     * @return IsExistingUserResponse
+     */
+    public function isExistingUser(IsExistingUser $parameters) {
+        return $this->__soapCall('isExistingUser', array($parameters), array(
+                    'uri' => 'http://service.ws.um.carbon.wso2.org',
+                    'soapaction' => ''
+        ));
+    }
+
+    /**
+     * Function to update credential by admin
+     *
+     * @param UpdateCredentialByAdmin $parameters
+     * @return void
+     */
+    public function updateCredentialByAdmin(UpdateCredentialByAdmin $parameters) {
+        return $this->__soapCall('updateCredentialByAdmin', array($parameters), array(
+                    'uri' => 'http://service.ws.um.carbon.wso2.org',
+                    'soapaction' => ''
+        ));
+    }
+
+    /**
+     * Function to get the tenant id
+     *
+     * @param GetTenantId $parameters
+     * @return GetTenantIdResponse
+     */
+    public function getTenantId(GetTenantId $parameters) {
+        return $this->__soapCall('getTenantId', array($parameters), array(
+                    'uri' => 'http://service.ws.um.carbon.wso2.org',
+                    'soapaction' => ''
+        ));
+    }
+
+    /**
+     * Function to get role names 
+     *
+     * @param GetRoleNames $parameters
+     * @return GetRoleNamesResponse
+     */
+    public function getRoleNames(GetRoleNames $parameters) {
+        return $this->__soapCall('getRoleNames', array($parameters), array(
+                    'uri' => 'http://service.ws.um.carbon.wso2.org',
+                    'soapaction' => ''
+        ));
+    }
+
+    /**
+     * Funtion to get properties
+     *
+     * @param GetProperties $parameters
+     * @return GetPropertiesResponse
+     */
+    public function getProperties(GetProperties $parameters) {
+        return $this->__soapCall('getProperties', array($parameters), array(
+                    'uri' => 'http://service.ws.um.carbon.wso2.org',
+                    'soapaction' => ''
+        ));
+    }
+
+    /**
+     * Function to get user id
+     *
+     * @param GetUserId $parameters
+     * @return GetUserIdResponse
+     */
+    public function getUserId(GetUserId $parameters) {
+        return $this->__soapCall('getUserId', array($parameters), array(
+                    'uri' => 'http://service.ws.um.carbon.wso2.org',
+                    'soapaction' => ''
+        ));
+    }
+
+    /**
+     * Function to get all the profile names  
+     *
+     * @param GetAllProfileNames $parameters
+     * @return GetAllProfileNamesResponse
+     */
+    public function getAllProfileNames(GetAllProfileNames $parameters) {
+        return $this->__soapCall('getAllProfileNames', array($parameters), array(
+                    'uri' => 'http://service.ws.um.carbon.wso2.org',
+                    'soapaction' => ''
+        ));
+    }
+
+    /**
+     * Function to get the password expiration time 
+     *
+     * @param GetPasswordExpirationTime $parameters
+     * @return GetPasswordExpirationTimeResponse
+     */
+    public function getPasswordExpirationTime(GetPasswordExpirationTime $parameters) {
+        return $this->__soapCall('getPasswordExpirationTime', array($parameters), array(
+                    'uri' => 'http://service.ws.um.carbon.wso2.org',
+                    'soapaction' => ''
+        ));
+    }
+
+    /**
+     * Function to list users
+     *
+     * @param ListUsers $parameters
+     * @return ListUsersResponse
+     */
+    public function listUsers(ListUsers $parameters) {
+        return $this->__soapCall('listUsers', array($parameters), array(
+                    'uri' => 'http://service.ws.um.carbon.wso2.org',
+                    'soapaction' => ''
+        ));
+    }
+
+    /**
+     * Function to delete role 
+     *
+     * @param DeleteRole $parameters
+     * @return void
+     */
+    public function deleteRole(DeleteRole $parameters) {
+        return $this->__soapCall('deleteRole', array($parameters), array(
+                    'uri' => 'http://service.ws.um.carbon.wso2.org',
+                    'soapaction' => ''
+        ));
+    }
+
+    /**
+     * Function to delete user 
+     *
+     * @param DeleteUser $parameters
+     * @return void
+     */
+    public function deleteUser(DeleteUser $parameters) {
+        return $this->__soapCall('deleteUser', array($parameters), array(
+                    'uri' => 'http://service.ws.um.carbon.wso2.org',
+                    'soapaction' => ''
+        ));
+    }
+
+    /**
+     * Function get the role list of the user 
+     *
+     * @param GetRoleListOfUser $parameters
+     * @return GetRoleListOfUserResponse
+     */
+    public function getRoleListOfUser(GetRoleListOfUser $parameters) {
+        return $this->__soapCall('getRoleListOfUser', array($parameters), array(
+                    'uri' => 'http://service.ws.um.carbon.wso2.org',
+                    'soapaction' => ''
+        ));
+    }
+
+    /**
+     * Function to update the role name
+     *
+     * @param UpdateRoleName $parameters
+     * @return void
+     */
+    public function updateRoleName(UpdateRoleName $parameters) {
+        return $this->__soapCall('updateRoleName', array($parameters), array(
+                    'uri' => 'http://service.ws.um.carbon.wso2.org',
+                    'soapaction' => ''
+        ));
+    }
+
+    /**
+     * Function to check whether a role is existing 
+     *
+     * @param IsExistingRole $parameters
+     * @return IsExistingRoleResponse
+     */
+    public function isExistingRole(IsExistingRole $parameters) {
+        return $this->__soapCall('isExistingRole', array($parameters), array(
+                    'uri' => 'http://service.ws.um.carbon.wso2.org',
+                    'soapaction' => ''
+        ));
+    }
+
+    /**
+     * Function to update role list of user 
+     *
+     * @param UpdateRoleListOfUser $parameters
+     * @return void
+     */
+    public function updateRoleListOfUser(UpdateRoleListOfUser $parameters) {
+        return $this->__soapCall('updateRoleListOfUser', array($parameters), array(
+                    'uri' => 'http://service.ws.um.carbon.wso2.org',
+                    'soapaction' => ''
+        ));
+    }
+
+    /**
+     * Function to get user claim values 
+     *
+     * @param GetUserClaimValues $parameters
+     * @return GetUserClaimValuesResponse
+     */
+    public function getUserClaimValues(GetUserClaimValues $parameters) {
+        return $this->__soapCall('getUserClaimValues', array($parameters), array(
+                    'uri' => 'http://service.ws.um.carbon.wso2.org',
+                    'soapaction' => ''
+        ));
+    }
+
+    /**
+     * Function to get hybrid roles
+     *
+     * @param GetHybridRoles $parameters
+     * @return GetHybridRolesResponse
+     */
+    public function getHybridRoles(GetHybridRoles $parameters) {
+        return $this->__soapCall('getHybridRoles', array($parameters), array(
+                    'uri' => 'http://service.ws.um.carbon.wso2.org',
+                    'soapaction' => ''
+        ));
+    }
+
+    /**
+     * Function to add user claim values 
+     *
+     * @param AddUserClaimValues $parameters
+     * @return void
+     */
+    public function addUserClaimValues(AddUserClaimValues $parameters) {
+        return $this->__soapCall('addUserClaimValues', array($parameters), array(
+                    'uri' => 'http://service.ws.um.carbon.wso2.org',
+                    'soapaction' => ''
+        ));
+    }
+
+    /**
+     * Function to add user 
+     *
+     * @param AddUser $parameters
+     * @return void
+     */
+    public function addUser(AddUser $parameters) {
+        return $this->__soapCall('addUser', array($parameters), array(
+                    'uri' => 'http://service.ws.um.carbon.wso2.org',
+                    'soapaction' => ''
+        ));
+    }
+
+    /**
+     * Function to add role 
+     *
+     * @param AddRole $parameters
+     * @return void
+     */
+    public function addRole(AddRole $parameters) {
+        return $this->__soapCall('addRole', array($parameters), array(
+                    'uri' => 'http://service.ws.um.carbon.wso2.org',
+                    'soapaction' => ''
+        ));
+    }
+
+    /**
+     * Function to update user list of roles 
+     *
+     * @param UpdateUserListOfRole $parameters
+     * @return void
+     */
+    public function updateUserListOfRole(UpdateUserListOfRole $parameters) {
+        return $this->__soapCall('updateUserListOfRole', array($parameters), array(
+                    'uri' => 'http://service.ws.um.carbon.wso2.org',
+                    'soapaction' => ''
+        ));
+    }
+
+    /**
+     * Function to get the tenant Id 
+     *
+     * @param GetTenantIdofUser $parameters
+     * @return GetTenantIdofUserResponse
+     */
+    public function getTenantIdofUser(GetTenantIdofUser $parameters) {
+        return $this->__soapCall('getTenantIdofUser', array($parameters), array(
+                    'uri' => 'http://service.ws.um.carbon.wso2.org',
+                    'soapaction' => ''
+        ));
+    }
+
+    /**
+     * Function to set user claim values 
+     *
+     * @param SetUserClaimValues $parameters
+     * @return void
+     */
+    public function setUserClaimValues(SetUserClaimValues $parameters) {
+        return $this->__soapCall('setUserClaimValues', array($parameters), array(
+                    'uri' => 'http://service.ws.um.carbon.wso2.org',
+                    'soapaction' => ''
+        ));
+    }
+
+    /**
+     * Function to add user claim value 
+     *
+     * @param AddUserClaimValue $parameters
+     * @return void
+     */
+    public function addUserClaimValue(AddUserClaimValue $parameters) {
+        return $this->__soapCall('addUserClaimValue', array($parameters), array(
+                    'uri' => 'http://service.ws.um.carbon.wso2.org',
+                    'soapaction' => ''
+        ));
+    }
+
+    /**
+     * Function to get the profile names
+     *
+     * @param GetProfileNames $parameters
+     * @return GetProfileNamesResponse
+     */
+    public function getProfileNames(GetProfileNames $parameters) {
+        return $this->__soapCall('getProfileNames', array($parameters), array(
+                    'uri' => 'http://service.ws.um.carbon.wso2.org',
+                    'soapaction' => ''
+        ));
+    }
+
+}
+
+?>

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/2040a6d4/workbench/airavata/wsis/src/Airavata/Wsis/Wsis.php
----------------------------------------------------------------------
diff --git a/workbench/airavata/wsis/src/Airavata/Wsis/Wsis.php b/workbench/airavata/wsis/src/Airavata/Wsis/Wsis.php
new file mode 100755
index 0000000..e4cbb6e
--- /dev/null
+++ b/workbench/airavata/wsis/src/Airavata/Wsis/Wsis.php
@@ -0,0 +1,280 @@
+<?php
+
+namespace Airavata\Wsis;
+
+use Illuminate\Support\Facades\Config;
+use Airavata\Wsis\Stubs\UserStoreManager;
+
+class Wsis {
+
+    /**
+     * @var UserStoreManager
+     * @access private
+     */
+    private $userStoreManager;
+
+    /**
+     * @var string
+     * @access private
+     */
+    private $server;
+
+    /**
+     * @var string
+     * @access private
+     */
+    private $service_url;
+
+
+    /**
+     * Constructor
+     *
+     * @param string $admin_username
+     * @param string $admin_password
+     * @param string $server
+     * @param string $service_url
+     * @param string $cafile_path
+     * @param bool   $verify_peer
+     * @param bool   $allow_selfsigned_cer
+     * @throws Exception
+     */
+    public function __construct($admin_username, $admin_password = null, $server,
+                                $service_url,$cafile_path, $verify_peer, $allow_selfsigned_cert) {
+
+        $context = stream_context_create(array(
+            'ssl' => array(
+                'verify_peer' => $verify_peer,
+                "allow_self_signed"=> $allow_selfsigned_cert,
+                'cafile' => $cafile_path,
+                'CN_match' => $server,
+            )
+        ));
+
+        $parameters = array(
+            'login' => $admin_username,
+            'password' => $admin_password,
+            'stream_context' => $context,
+            'trace' => 1,
+            'features' => SOAP_WAIT_ONE_WAY_CALLS
+        );
+
+        $this->server = $server;
+        $this->service_url = $service_url;
+
+        try {
+            $this->userStoreManager = new UserStoreManager($service_url, $parameters);
+        } catch (Exception $ex) {
+            print_r( $ex); exit;
+            throw new Exception("Unable to instantiate client", 0, $ex);
+        }
+    }
+
+
+    /**
+     * Function to add new user
+     *
+     * @param string $userName
+     * @param string $password
+     * @return void
+     * @throws Exception
+     */
+    public function addUser($userName, $password, $fullName) {
+        try {
+            $this->userStoreManager->addUser($userName, $password, $fullName);
+        } catch (Exception $ex) {
+            throw new Exception("Unable to add new user", 0, $ex);
+        }
+    }
+
+    /**
+     * Function to delete existing user
+     *
+     * @param string $username
+     * @return void
+     * @throws Exception
+     */
+    public function deleteUser($username) {
+        try {
+            $this->userStoreManager->deleteUser($username);
+        } catch (Exception $ex) {
+            throw new Exception("Unable to delete user", 0, $ex);
+        }
+    }
+
+
+    /**
+     * Function to authenticate user
+     *
+     * @param string $username
+     * @param string $password
+     * @return boolean
+     * @throws Exception
+     */
+    public function authenticate($username, $password){
+        try {
+            return $this->userStoreManager->authenticate($username, $password);
+        } catch (Exception $ex) {
+            var_dump( $ex); exit;
+            throw new Exception("Unable to authenticate user", 0, $ex);
+        }
+    }
+
+    /**
+     * Function to check whether username exists
+     *
+     * @param string $username
+     * @return boolean
+     * @throws Exception
+     */
+    public function username_exists($username){
+        try {
+            return $this->userStoreManager->isExistingUser($username);
+        } catch (Exception $ex) {
+            throw new Exception("Unable to verify username exists", 0, $ex);
+        }
+    }
+
+    /**
+     * Function to check whether a role is existing
+     *
+     * @param string $roleName
+     * @return IsExistingRoleResponse
+     */
+    public function is_existing_role( $roleName){
+        try {
+            return $this->userStoreManager->isExistingRole( $roleName);
+        } catch (Exception $ex) {
+            throw new Exception("Unable to check if the role exists", 0, $ex);
+        }
+    }
+
+    /**
+     * Function to add new role by providing the role name.
+     *
+     * @param string $roleName
+     */
+    public function add_role($roleName){
+        try {
+            return $this->userStoreManager->addRole( $roleName);
+        } catch (Exception $ex) {
+            throw new Exception("Unable to add this role", 0, $ex);
+        }
+    }
+
+    /**
+     * Function to delete existing role
+     *
+     * @param string $roleName
+     * @return void
+     * @throws Exception
+     */
+    public function delete_role($roleName) {
+        try {
+            $this->userStoreManager->deleteRole($roleName);
+        } catch (Exception $ex) {
+            var_dump( $ex); exit;
+
+            throw new Exception("Unable to delete role", 0, $ex);
+        }
+    }
+
+    /**
+     * Function to get the list of all existing roles
+     *
+     * @return roles list
+     */
+    public function get_all_roles(){
+        try {
+            return $this->userStoreManager->getRoleNames();
+        } catch (Exception $ex) {
+            throw new Exception("Unable to get all roles", 0, $ex);
+        }
+    }
+
+    /**
+     * Function to get role of a user
+     *
+     * @return user role
+     */
+    public function get_user_roles( $username){
+        try {
+            return $this->userStoreManager->getRoleListOfUser( $username);
+        } catch (Exception $ex) {
+            throw new Exception("Unable to get User roles.", 0, $ex);
+        }
+    }
+
+    /**
+     * Function to get the user list of role
+     *
+     * @param GetUserListOfRole $parameters
+     * @return GetUserListOfRoleResponse
+     */
+    public function get_userlist_of_role( $role){
+        try {
+            return $this->userStoreManager->getUserListOfRole( $role);
+        } catch (Exception $ex) {
+            var_dump( $ex); exit;
+            throw new Exception("Unable to get user list of roles.", 0, $ex);
+        }
+    }
+
+    /**
+     * Function to update role list of user
+     *
+     * @param UpdateRoleListOfUser $parameters
+     * @return void
+     */
+    public function update_user_roles( $username, $roles){
+        try {
+            return $this->userStoreManager->updateRoleListOfUser( $username, $roles);
+        } catch (Exception $ex) {
+            throw new Exception("Unable to update role of the user.", 0, $ex);
+        }
+    }
+
+    /**
+     * Function to list users
+     *
+     * @param void
+     * @return void
+     */
+    public function list_users(){
+        try {
+            return $this->userStoreManager->listUsers();
+        } catch (Exception $ex) {
+            var_dump( $ex->debug_message);
+            throw new Exception("Unable to list users.", 0, $ex);
+        }
+    }
+
+    /**
+     * Function to get the tenant id
+     *
+     * @param GetTenantId $parameters
+     * @return GetTenantIdResponse
+     */
+    public function get_tenant_id(){
+        try {
+            return $this->userStoreManager->getTenantId();
+        } catch (Exception $ex) {
+            var_dump( $ex->debug_message);
+            throw new Exception("Unable to get the tenant Id.", 0, $ex);
+        }
+    }
+
+    /**
+     * Function create a new Tenant
+     *
+     * @param Tenant $parameters
+     * @return void
+     */
+    public function create_tenant( $inputs){
+        try {
+            return $this->userStoreManager->createTenant( $inputs);
+        } catch (Exception $ex) {
+            var_dump( $ex);
+            throw new Exception("Unable to create Tenant.", 0, $ex);
+        }
+    }
+} 
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/2040a6d4/workbench/airavata/wsis/src/Airavata/Wsis/WsisServiceProvider.php
----------------------------------------------------------------------
diff --git a/workbench/airavata/wsis/src/Airavata/Wsis/WsisServiceProvider.php b/workbench/airavata/wsis/src/Airavata/Wsis/WsisServiceProvider.php
new file mode 100755
index 0000000..e5a2cf4
--- /dev/null
+++ b/workbench/airavata/wsis/src/Airavata/Wsis/WsisServiceProvider.php
@@ -0,0 +1,64 @@
+<?php namespace Airavata\Wsis;
+
+use Illuminate\Support\ServiceProvider;
+use Illuminate\Support\Facades\Config;
+
+class WsisServiceProvider extends ServiceProvider {
+
+	/**
+	 * Indicates if loading of the provider is deferred.
+	 *
+	 * @var bool
+	 */
+	protected $defer = false;
+
+    /**
+     * Bootstrap the application events.
+     *
+     * @return void
+     */
+    public function boot()
+    {
+        $this->package('airavata/wsis');
+    }
+
+	/**
+	 * Register the service provider.
+	 *
+	 * @return void
+	 */
+	public function register()
+	{
+        //registering service provider
+        $this->app['wsis'] = $this->app->share(function($app)
+        {
+            return new Wsis(
+                Config::get('wsis::admin-username'),
+                Config::get('wsis::admin-password'),
+                Config::get('wsis::server'),
+                Config::get('wsis::service-url'),
+                Config::get('wsis::cafile-path'),
+                Config::get('wsis::verify-peer'),
+                Config::get('wsis::allow-selfsigned-cert')
+            );
+        });
+
+        //registering alis
+        $this->app->booting(function()
+        {
+            $loader = \Illuminate\Foundation\AliasLoader::getInstance();
+            $loader->alias('WSIS', 'Airavata\Wsis\Facades\Wsis');
+        });
+	}
+
+	/**
+	 * Get the services provided by the provider.
+	 *
+	 * @return array
+	 */
+	public function provides()
+	{
+		return array('wsis');
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/2040a6d4/workbench/airavata/wsis/src/config/config.php
----------------------------------------------------------------------
diff --git a/workbench/airavata/wsis/src/config/config.php b/workbench/airavata/wsis/src/config/config.php
new file mode 100644
index 0000000..69f61cf
--- /dev/null
+++ b/workbench/airavata/wsis/src/config/config.php
@@ -0,0 +1,52 @@
+<?php
+return array(
+    /**
+     * Admin Role Name
+     */
+    'admin-role-name' => 'admin',
+
+    /**
+     * Gateway user role
+     */
+    'gateway-admin' => 'Internal/everyone',
+
+    /**
+     * Tenant admin's username
+     */
+    'admin-username' => 'admin-username',
+
+    /**
+     * Tenant admin's password
+     */
+    'admin-password' => 'admin-password',
+
+    /**
+     * Identity server domain
+     */
+    'server' => 'idp.scigap.org',
+
+    /**
+     * Identity server web services endpoint
+     */
+    'service-url' => 'https://idp.scigap.org:7443/services/',
+
+    /**
+     * Gateway domain name
+     */
+    'gateway-id' => 'default',
+
+    /**
+     * Path to the server certificate file
+     */
+    'cafile-path' => app_path() . '/resources/security/idp_scigap_org.pem',
+
+    /**
+     * Enable HTTPS server verification
+     */
+    'verify-peer' => true,
+
+    /**
+     * Allow self signed server certificates
+     */
+    'allow-self-signed' => false
+);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/2040a6d4/workbench/airavata/wsis/tests/.gitkeep
----------------------------------------------------------------------
diff --git a/workbench/airavata/wsis/tests/.gitkeep b/workbench/airavata/wsis/tests/.gitkeep
new file mode 100755
index 0000000..e69de29


Mime
View raw message