Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » PHP BIRT Integration - parameter Passing
PHP BIRT Integration - parameter Passing [message #735360] Tue, 11 October 2011 14:46
karvesh ghunsam is currently offline karvesh ghunsamFriend
Messages: 95
Registered: July 2011
Member
Dear Jason

I am having some problem to pass date parameters from php to birt via the javabridge.
I have declared a parameter in birt of datatype date. Then in my php code i am trying:

$task->setParameterValue("paramDtFrom", new java("java.util.Date", $DTFROM));

However, i am getting an exception error. Then i looked at the Java.inc file in the java bridge where the data types are declared and found the following piece of code:

function __call($method,$args) {
$client=$this->__client;
$sig="@{$this->__signature}@$method";
$len=count($args);
$args2=array($this->__java);
for($i=0; $i<$len; $i++) {
switch(gettype($val=$args[$i])) {
case 'boolean': array_push($args2,$val); $sig.='@b'; break;
case 'integer': array_push($args2,$val); $sig.='@i'; break;
case 'double': array_push($args2,$val); $sig.='@d'; break;
case 'string': array_push($args2,htmlspecialchars($val,ENT_COMPAT)); $sig.='@s'; break;
case 'array':$sig="~INVALID"; break;
case 'object':
if($val instanceof java_JavaType) {
array_push($args2,$val->__java);
$sig.="@o{$val->__signature}";
}
else {
$sig="~INVALID";
}
break;
case 'resource': array_push($args2,$val); $sig.='@r'; break;
case 'NULL': array_push($args2,$val); $sig.='@N'; break;
case 'unknown type': array_push($args2,$val); $sig.='@u'; break;
default: throw new java_IllegalArgumentException($val);
}

Does that mean that date data types cannot be passed via the javabridge?

Should i pass them as string values rather?

Thanks in advance..
Karvesh
Previous Topic:PHP BIRT Integration - parameter Passing
Next Topic:PHP BIRT Integration - parameter Passing
Goto Forum:
  


Current Time: Mon Nov 24 16:43:42 GMT 2014

Powered by FUDForum. Page generated in 0.02538 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software