#! /usr/bin/php
<?php

include("ox-soap.php");

try {
	
	$result = getResourceClient($SOAPHOST)->list(getContextObject($CONTEXT_ID),"*", getCredentialsObject($CONTEXT_ADMIN,$CONTEXT_ADMIN_PASS));
	
	if (!is_soap_fault($result)) {
		if (is_array($result)) {
			foreach ($result['return'] as $val_obj) {
				printResource($val_obj);
			}
		} else {
			printResource($result);
		}
	}
	
} catch (SoapFault $fault) {
	handleSoapFault($fault);
} catch (Exception $e) {
	handleExcepion($e);
}
?>
