Login and sessions

Before you can access the AWS functionality, you must log into the service using your Ascio account username and password. You only need to log in once per session, as the login function returns a unique sessionID that can be used in next calls. Each sessionId remains valid until you call the logout function or after twenty minutes of inactivity. It is possible to have multiple sessions at the same time.

Please look at the examples.

LogIn input parameters

Property
session

Example

<?php
namespace ascio\v2\examples;
require("../service/autoload.php");
require("../../lib/AscioConfig.php");
use ascio\v2 as ascio;
use ascio\lib as lib;
function logInExample() {
	$config = new lib\Config();
	$env = $config->get("testing"); //testing or live
	
	$ascioClient	 = new ascio\AscioServices(array("trace" => true),$env->getWsdl("v2"));

	$session =  new ascio\Session();
	$session->setAccount("AccountTest");
	$session->setPassword("PasswordTest");
	try {
		 $response = $ascioClient->LogIn(new ascio\LogIn($session));
        } catch (\Exception $e) {
    		echo ("[".$e->faultcode . "] ". $e->faultstring);
	    	return;
        
        }
	$result = $response->getLogInResult();
	echo "Code: ".$result->getResultCode()."\n";
	echo "Message: ".$result->getMessage()."\n";  
	return $result;
}
logInExample();

LogOut input parameters

PropertyDescription
sessionIdExample: o58t9fjgw9bjarp6q7byv13e

Example

<?php
namespace ascio\v2\examples;
require("../service/autoload.php");
require("../../lib/AscioConfig.php");
use ascio\v2 as ascio;
use ascio\lib as lib;
function logOutExample() {
	$config = new lib\Config();
	$env = $config->get("testing"); //testing or live
	$sessionId = "12345";
	$ascioClient	 = new ascio\AscioServices(array("trace" => true),$env->getWsdl("v2"));
	try {
		 $response = $ascioClient->LogOut(new ascio\LogOut($sessionId));
        } catch (\Exception $e) {
    		echo ("[".$e->faultcode . "] ". $e->faultstring);
	    	return;
        
        }
	$result = $response->getLogOutResult();
	echo "Code: ".$result->getResultCode()."\n";
	echo "Message: ".$result->getMessage()."\n";  
	return $result;
}
logOutExample();
WSDL for AWS v2
https://aws.demo.ascio.com/2012/01/01/AscioService.wsdl (OTE)
https://aws.ascio.com/2012/01/01/AscioService.wsdl (Live)