OK, for an OO-experienced person this seems to be obvious but sometimes it helps to clarify things. If you call a web service client (web service stub) from Oracle Forms you have to import one or more classes of the web service client into the Forms module.
There are different case:
- If the class is static the signature of the imported methods in most cases only contains simple datatypes like in this example
FUNCTION <method>(
a0 VARCHAR2,
a1 VARCHAR2,
a2 VARCHAR2) RETURN BOOLEAN;
This can be handled easily from your Forms application by passing the appropriate values. - If the class is non-static, i.e. there are existing instances of this class you will find an object in the signature of the PL/SQL method call: FUNCTION <method>(
obj ORA_JAVA.JOBJECT,
a0 VARCHAR2,
a1 VARCHAR2) RETURN ORA_JAVA.JOBJECT;
In this case you have to pass an initialized object for this class by using the method new in your PL/SQL code:
obj := <class>.new(); - If the class is non-static and requires an additional object to be passed as a parameter to the called method the signature of the PL/SQL method call could look like this:
FUNCTION <method>(
obj ORA_JAVA.JOBJECT,
a0 ORA_JAVA.JOBJECT,
a1 VARCHAR2,
a2 VARCHAR2) RETURN ORA_JAVA.JOBJECT;
In this case you have to pass an initialized object for this class by using the method new in your PL/SQL code:
obj := <class>.new(); and
to initialize an additional object for the parameter by importing the required class into the Forms module and create a new instance:
a0:<additional_class>.new();