what i am trying to do is call the getDataForNew function and get the result. Then call the TransferTypeService.save to save it
but while i am calling getDataForNew i got below error
stdClass Object
(
[class] => java.lang.NullPointerException
[errorCode] => NULL_POINTER
)
Error while calling transferTypeService.getDataForNew: NULL_POINTER
Code: Select all
require_once 'configureCyclos.php';
Cyclos\Configuration::setAuthentication("username", "pass");
$TransferTypeService = new Cyclos\TransferTypeService();
try {
$ac = new stdClass;
$ac->class = "org.cyclos.model.banking.accounttypes.AccountTypeVO";
$ac->id = 'id';
$fac = new stdClass;
$fac->class = "org.cyclos.model.banking.accounttypes.AccountTypeVO";
$fac->id = 'id';
$data = new stdClass();
$data->operation = "getDataForNew";
$data->params = array(
"class" => "org.cyclos.model.banking.transfertypes.TransferTypeDataParams",
'id' => 'id',
'nature' => 'PAYMENT'
);
array_push($data->params,$ac,$fac);
$getNew = $TransferTypeService->getDataForNew($data);
echo "<pre>";
print_r($getNew);
} catch (Cyclos\ServiceException $e) {
echo "<pre>";
print_r($e->error);
echo("Error while calling $e->service.$e->operation: $e->errorCode");
}
can someone please point me my mistake