Skip to content

enoola/Xenmobile_RESTWS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

87 Commits
 
 
 
 
 
 
 
 

Repository files navigation

This is a PhP Client for Xenmobile REST Webservice

Bear in mind that you do have descriptions on each folder (through README.md)
  • Aim : Provide a PhP client for Citrix Xenmobile Rest Webservices (for version superior or equal to 10.3)
  • Means : php mainly maybe other later like ( composer, pear, phpDocumentor, github, community I hope :) ) Constraints :
  • provider webservices responses can be disturbing (with a status containing a message without a status..), so singularity have been added to classes in order to handle that.

##Pre-requisites Citrix Xenmobile (version >10.3), if you have equal to 10.3 it will work with most of the functions implemented but not all. Do not hesitate to reach out if you need help in implementing workaround methods or whatever.

PhP >= 5.6

##If you intend to run tests :) ###Before using or running

    1. Do the usual 'git clone'
    1. unzip simpletest_v1.1.0.zip to simpletest_v1
    1. Create a file in the root folder name config_file.ini make it looks like ./tests/badfqdn_config_file.ini with the fields regarding your instance
    1. Place yourself in src/ folder
    1. Run Simple test by typing
    • php ./tests/TestsLauncher.php

##Usage Example

/*
 * Consume authentication webservice
 * login, logout
 */
./require_once('./class/Xenmobile_RESTWS_Authentication.php');
$szFQDN = 'xenmobile.contoso.com';

$oCliXM_WS = new Xenmobile_RESTWS_Main( $szFQDN, 4443, 'https',false );

if ( $oCliXM_WS->login('username', 'password' ) == false )
{
  echo PHP_EOL.$oCliXM_WS->_getLastRequestResult()->message.'json code:'.
        $oCliXM_WS->_getLastRequestResult()->status.', ' .
        $oCliXM_WS->getLastHttpReturnCode().
        PHP_EOL;
  exit (1);
}

echo 'auth_token :' . $oCliXM_WS->getAuthToken() . PHP_EOL;

if ( $oCliXM_WS->logout() == true)
{
  echo 'status : ' . $oCliXM_WS->_getLastRequestResult()->Status . PHP_EOL;
}
exit (0);

About

PhP REST Client for Citrix Xenmobile 10x

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages