Home » Developer & Programmer » Forms » Problem with Java Classes, Array in Forms 11g (Forms 11g)
Problem with Java Classes, Array in Forms 11g [message #555995] Wed, 30 May 2012 08:38
jbria
Messages: 1
Registered: May 2012
Junior Member
Hello, i have a situation when a need to call a web services.
I have 3 classes..and a need to call a method

Class1 have a method
public void setIva(ArrayOfAlicIva value)

Class ArrayOfAlicIva is
protected List<AlicIva> alicIva;
This class not have a metho to set de object

and
Class AlicIva have 1 attributes call base int and method setBase

When imported to Forms, i have the package with this clasess...
The problem is when i have to call a SetIva Method.
In pl/sql i have
Case 1
OraAlicIva := AlicIva.new(); --OK
AlicIva.setBase(OraAlicIva , 10); --OK
Class1.setIva(Object_to_Class1, OraAlicIva); --Error, is not type excpected

Case 2
OraAlicIva := ArrayOfAlicIva.new(); --OK
AlicIva.setBase(OraAlicIva , 10); --Error, setBase is not defined
Class1.setIva(Object_to_Class1, OraAlicIva); --OK

Case 3
OraAlicIva := AlicIva.new(); --OK
OraAlicIva2 :=ORA_JAVA.NEW_OBJECT_ARRAY(1,'ArrayOfAlicIva'); --OK
AlicIva.setBase(OraAlicIva , 10); --OK
ORA_JAVA.SET_OBJECT_ARRAY_ELEMENT(OraAlicIva2 , 0, OraAlicIva); --Error, ExceptionStoreArray
Class1.setIva(Object_to_Class1, OraAlicIva); --OK

The Solutions in Java is
AlicIva[] alicIva = new AlicIva[1];
alicIva[0]= new AlicIva();
alicIva[0].setId(Short.parseShort(1));
fedr[0].setIva(alicIva);}

Is posible to Resolve ??
Thanks and Sorry for my inglish
Previous Topic: ORA-01036: illegal variable name/number
Next Topic: How to capture a return value from LOV at run time
Goto Forum:
  


Current Time: Fri Jul 05 22:33:45 CDT 2024