Skip to Main Content

Oracle Forms

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Problem with Java Clasess and Arrays

user4783187May 30 2012 — edited May 31 2012
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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 28 2012
Added on May 30 2012
3 comments
196 views