|
From: <php...@li...> - 2007-09-25 12:14:58
|
Hi Jost,
thanks for the quick response. it works now (see below)
On 9/25/07, php...@li... <
php...@li...> wrote:
> Hi,
>
> >
> [o(DepMnt0302AcctDispDelSrvImport$InBankParameters)]->setCurrTrxDate((Date)c(Date)).
>
> AFAIK you need to pass a date object. Not a class. Note the "c" above.
So c for class and o for object (yes it is obvious now I know)
> > $java_date = new Java("java.sql.Date");
>
> You cannot instanciate java.sql.Date() because no such constructor exists.
> You probably want
>
> java("java.sql.Date")->valueOf(...);
That did not work. I can howeever create an instance of java.sql.Date even
if no such constructor exists (bug?)
> > $java_date->valueOf("2007-12-07");
>
> Why do you ask the date class "$java_date" to return an instance
> "2007-12-07" and then throw it
> away?
That was the problem. I did not realise that I was throwing it away.
The complete code that works is:
$java_date = *new* Java("java.sql.Date");
$java_date = $java_date->valueOf("2007-12-07");
$proxy_input->getInParameters()->getInBankParameters()->setCurrTrxDate(
$java_date);
Note the
$java_date = $java_date->valueOf("2007-12-07");
instead of the line that I had originally
$java_date->valueOf("2007-12-07");
Thanks again,
Apostolos
|