Variable No. of Arguments

How we can pass variable no. of arguments in JAVA (like in C/C++)
where arguments are different type?
To pass similar data type, we declare function as follows:-
<type_specifier> function_name(Object vna...) {
<function_body>;
}

cotton.m wrote:
gajesh wrote:
How we can pass variable no. of arguments in JAVA (like in C/C++)
where arguments are different type?In my opinion you should stop now and really consider if this is a good idea. (It isn't). Do you really want a method that can take any number of variables of any type? (You don't). What kind of code will your method need to deal with this (a lot of ugly instance of probably).
This is just not a good idea. I would suspect you want to do this in the name of some sort of "flexibility" but if so this is the wrong way to approach this and your design needs a rethink.I would also assume he simply wants to have a set parameter string that he can use in every method declaration he writes, so that he doesn't have to bother about any sort of restrictions. Who cares about all the problems that might (will) cause with every other aspect of the program though. ;-)

Similar Messages

  • Variable number of arguments in procedure PL/SQL

    Hello everyone,
    I have a "simple" question : can a procedure PL/SQL take a variable number of arguments ?
    In my case, the procedure is called by the submit button of a form, and the form has variable number of inputs...
    Thanks you !

    862447 wrote:
    I have a "simple" question : can a procedure PL/SQL take a variable number of arguments ?No. Not in the style of Pascal and C/C++. E.g. int printf( char * format, … ) in C using va_list.
    In my case, the procedure is called by the submit button of a form, and the form has variable number of inputs...There are a couple of merhods.
    Code a fixed number of parameters in the procedure signature. Assign defaults to these. The caller can now select which parameters from the fixed list to use and which not.
    Create a structure. For example, having a 100 parameters in a signature is something I will call plain stupidity. This creates usability issues, maintenance issues and even performance issues. And debugging will be a nightmare. So instead create a structure (aka record in the PL/SQL language or an object using the SQL language) - where this structure describes (in a structured and logical way) the list of parameters.
    Neither of these method however allows the caller to pass a variable number parameters - the parameter signature is fixed. It has a fixed number of defined parameters.
    So the only way to simulate a variable parameter signature is to use a collection. The collection itself is of course a single parameter passed. But it can have 0 elements. It can have a 1000 elements. And similar to a va_list in C/C++, the procedure can iterate through the data passed via the parameter by the caller.
    Simple example:
    //-- define the collection type, e.g. a collection of strings
    create or replace type TStrings is table of varchar2(4000);The procedure's signature:
    --// passing by referencing and not value should be considered
    create or replace procedure FooProc( param TStrings ) is ..And to call this procedure with variable parameters:
    --// calling it with 2 param value
    FooProc( TString('123','testing') );
    --// calling it with 5 param values
    FooProc( TString('p1','p2','p3','p4','p5') );

  • Passing variable number of arguments in a stored procedure

    Hi Team,
    i am facing a problem. I have a dynamic form which contains some checkboxes. The number of checkboxes are dynamically generated on querying the database. On the form submission i want to call a stored procedure that will update the values in the database. i want to know that is there any way to handle variable number of arguments in the stored procedure or can i get the variables through some session context and use it in my stored procedure.
    Any help is greatly appreciated.
    Thanks&Regards
    Saurabh Jain

    Hi Saurabh,
    The method in which stored procedures are called on form submit is something as follows.
    Let us take your scenario of a form which has multiple checkboxes and a submit button. On clicking the submit button, this form data is submitted using either get or post. The form's submit action invokes a procedure.
    The HTML form code will look something like this..
    htp.formOpen( curl => 'URL /myProcedure',
    cmethod => 'post' );
    htp.formCheckbox( cname => 'myCheckbox'
    cvalue => 'A');
    htp.formCheckbox( cname => 'myCheckbox'
    cvalue => 'B');
    htp.formCheckbox( cname => 'myCheckbox'
    cvalue => 'C');
    htp.formSubmit( cname => 'myButton',
    cvalue => 'OK');
    Now, whenever the submit button is clicked, all these form values are passed to our stored procedure 'myProcedure'.
    "myProcedure" looks something like this.
    procedure myProcedure
    myCheckbox IN sys.owa_util.vc_arr,
    myButton IN VARCHAR2
    is
    begin
    end myProcedure;
    The point to be noted here is that the name of the variable being passed in the procedure is the same as the name of the HTML element being created in the HTML form. So, there is a direct mapping between the elements in the HTML form and the procedure parameters.
    Another noteworthy point is that since you have multiple checkboxes in your HTML form, it is impractical to name all the checkboxes differently and then pass those many parameters to your procedure (Imagine a scenario where there are a hundred check-boxes in an HTML form!). So portal allows you to give the same name (cname) to all the checkboxes in your HTML form, and if multiple checkboxes are checked, it will return all the checkbox values in an array (Note the usage of "myCheckbox IN sys.owa_util.vc_arr" in myProcedure).
    You can check out this link for more information.
    Re: retrieving data from fields
    Thanks,
    Ashish.

  • Variable number of arguments in C functions

    Hello. I know how to achieve creating a function that accepts a variable number of arguments. For example:
    #include <stdio.h>
    #include <stdarg.h>
    int add (int x, ...);
    int main (int argc, const char * argv[])
    int result = add(3, 5, 3, 7);
    printf("%d", result);
    return 0;
    int add (int x, ...)
    va_list argList;
    va_start(argList, x);
    int sum = 0;
    int i;
    for (i = 0; i < x; ++i)
    sum += va_arg(argList, int);
    va_end(argList);
    return sum;
    The first argument, x, is sent to the function and represents how many additional optional arguments will be sent to the function (3 in the above example). Then, the definition of the add function totals those remaining (3) arguments, returning a value of (in this case) 15, which main then prints to the console. Simple enough, but here's my question:
    What if I want to achieve this same optional arguments concept without having to send the function the number of optional arguments it will be accepting. For example, the printf() function takes an optional number of arguments, and nowhere there do you have to specify an extra argument that represents the number of additional optional arguments being passed (unless maybe the number of formatting specifiers in the first argument determines this number). Can this be done? Does anyone have any input here? Thanks in advance.

    Hi Tron -
    I looked over my first response again, and it needs to be corrected. Fortunately Bob and Hansz straightened everything out nicely, but I still need to fix my post:
    RayNewbie wrote:
    Yes, the macros are designed to walk a list of args when neither the number of args or their type is known.
    The above should have said. "The macros are designed to walk a list of args when neither the number of args or their type is known _at compile time_".
    If I may both paraphrase and focus your original question, I think you wanted to know if there was any way the function could run without knowing the number of args to expect. The answer to this question is "No". In fact at runtime, the function must know both the number of args and the type of each.
    Tron55555 wrote:
    ... the printf() function takes an optional number of arguments, and nowhere there do you have to specify an extra argument that represents the number of additional optional arguments being passed (unless maybe the number of formatting specifiers in the first argument determines this number).
    As both Bob and Hansz have explained, the underlined statement is correct. Similarly, the example from the manual gives the number and types of the args in the first string arg.
    Hansz also included an alternative to an explicit count or format string, which is to terminate the arg list with some pre-specified value (this is sometimes called a "sentinel" value. However when using a sentinel, the called function must know the data types. For example, you could never simply terminate the args with a sentinel and then pass a double followed by an int. The combined length of these args is 8 + 4 => 12 bytes, so unless the function knew which type was first at compile time, it wouldn't be possible to determine whether the list was 4+8 or 8+4 at runtime.
    If you're interested in knowing why a variable arg function is limited in this way, or in fact how any C function finds its args, its parameters, and how to return to the calling function, you might want to do some reading about the "stack frame". You can learn the concept without getting into any assembler code. Here's an article that might be good to start with: [http://en.citizendium.org/wiki/Stack_frame].
    After you have some familiarity with the stack frame, take a look at the expansions of the stdarg macros and see if you can figure out how they work, especially how va_arg walks down the stack, and what info is required for a successful trip. Actually, I don't think you can find these expansions in the stdarg.h file for Darwin; it looks like the #defines point to built-in implementations, so here are some typical, but simplified defs:
    // these macros aren't usable; necessary type casts have been removed for clarity
    typedef va_list char*;
    #define va_start(ap,arg1) ap = &arg1 + sizeof(arg1)
    #define va_arg(ap,type) *(ap += sizeof(type))
    #define va_end(ap) 0
    Note that I"m trusting you not to start asking questions about the stack or the above macros until you've studied how a stack works and how the C stack frame works in particular.
    - Ray

  • Can we write function with variable number of argument

    Hi
    Can anybody tell that can we pass variable number of arguments to a function in oracle 10gR2.
    As in function decode we can pass variable no. of arguments upto 255 arguments, similarly can we creat a function which accept any no. of variables.

    I'm not sure that this is what you were asking about, but depending on the logic you want to implement, you can declare the maximum possible number of parameters to your function, give them default values, and then pass to your func as many parameters as you want:
    SQL> create or replace function test(p_a number:=null, p_b number:=null) return varchar2 is
      2    Result varchar2(100);
      3  begin
      4    result:='a='||p_a||', b='||p_b;
      5    return(Result);
      6  end test;
      7  /
    Function created
    SQL> select test() from dual;
    TEST()
    a=, b=
    SQL> select test(1) from dual;
    TEST(1)
    a=1, b=
    SQL> select test(1,2) from dual;
    TEST(1,2)
    a=1, b=2
    SQL> drop function test;
    Function dropped
    SQL>

  • Variable number of arguments in DML

    In my OLAP DML program, I need to take variable number of arguments. I took the number of inputs as one argument and then tried to take succeeding inputs as arguments in a while-loop, but got an error saying "All ARGUMENT statements must precede the first non-declarative"
    Can you suggest a way in which I can take variable number of arguments in an OLAP DML program?

    This any use:
    DEFINE ARG.TEST PROGRAM
    blank
    shw joinchars('Number of Arguments Passed: ' ARGCOUNT)
    blank
    blank
    shw joinchars('Argument 1: ' arg(1))
    shw joinchars('Argument 2: ' arg(2))
    shw joinchars('Argument 3: ' arg(3))
    shw joinchars('Argument 4: ' arg(4))
    blank

  • Using variables for function arguments AS2

      Hello,
    I am trying to create a function in AS2.
    After creating the function, I want to use values stored in variables for the function arguments rather than manually typing static values for carrying out the function calculation. Also, I want to use the function to assign a new value to the existing variable.
    I have asked a similar question 2 days ago here and got the answer (thank you), but now I got one more question - How can I create the function to assign a value to the variable while that variable itself is also a function argument?
    For example, I have 6 numeric variables:
    var CoinA:Number = 10;
    var CoinB:Number = 20;
    var CoinC:Number;
    var CoinD:Number = 30;
    var CoinE:Number = 40;
    var CoinF:Number;
    Then I tried to create a function to assign values to variables CoinC and CoinF:
    function CalculationA(FirstCoin, SecondCoin, ThirdCoin):Void {
         FirstCoin = SecondCoin + ThirdCoin;
    CalculationA(CoinC, CoinA, CoinB);
    CalculationA(CoinF, CoinE, CoinF);
    The above code didn't really assign the values 30 and 70 to the variables CoinC and CoinF but instead, values of CoinC and CoinF are undefined.
    Please give me the correct code if there's a correct way of doing this.
    Thank you,

    Here is one way of doing it, by passing a string value of the variable name instead of the actual variable name....
    var CoinA:Number = 10;
    var CoinB:Number = 20;
    var CoinC:Number;
    var CoinD:Number = 30;
    var CoinE:Number = 40;
    var CoinF:Number;
    function CalculationA(FirstCoin, SecondCoin, ThirdCoin):Void {
         this[FirstCoin] = SecondCoin + ThirdCoin;
    CalculationA("CoinC", CoinA, CoinB);
    CalculationA("CoinF", CoinD, CoinE);
    (Note that in your second function call I changed the coins since CoinF (ThirdCoin) is undefined at that point.)

  • Package variables vs procedure arguments

    Is it better to use package-level variables inside package or to use procedure arguments?
    I'm just asking because I have a bunch of parameters for each procedure (all of them are private, and are only called from within the package).
    Is better this:
    package a
    is
    --package variable
    v_something my_table%rowtype;
    procedure a
    is
    --do something with v_something
    end;
    procedure b
    is
    select * into v_something
    from my_table
    where rownum=1;
    --call it without parameters
    a;
    end;
    end;
    or this:
    package a
    is
    procedure a(inSomething my_table%rowtype)
    is
    --do something with v_something
    end;
    procedure b
    v_something my_table%rowtype;
    is
    select * into v_something
    from my_table
    where rownum=1;
    --call it with parameters
    a(v_something);
    end;
    end;

    Please post between the tags
    ..... and {code }
    If you have multiple procedures updating and reusing the package variable you loose track of what value you have in the package variable.
    And it depends what you are trying to do.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Can not pass CString variable as value argument to exported function in library

    I have extension library having following function exported
    __declspec(dllexport) int MyMessageBox(CString & csText, CString csCaption, const int iMsgType);
    The linker error is coming for second argument when I try to call the function from client.
     error LNK2001: unresolved external symbol "int __cdecl MyMessageBox(class ATL::CStringT<unsigned short,class StrTraitMFC_DLL<unsigned short,class ATL::ChTraitsCRT<unsigned short> > > &,class ATL::CStringT<unsigned short,class
    StrTraitMFC_DLL<unsigned short,class ATL::ChTraitsCRT<unsigned short> > > &,int)" (?MyMessageBox@@YAHAAV?$CStringT@GV?$StrTraitMFC_DLL@GV?$ChTraitsCRT@G@ATL@@@@@ATL@@0H@Z)
    I have checked project settings for both(client as well as DLL) and I think it may not an issue as both are using same character set and linker settings.
    Please help. 

    On 3/26/2015 9:01 AM, AtulPP wrote:
    I have extension library having following function exported
    __declspec(dllexport) int MyMessageBox(CString & csText, CString csCaption, const int iMsgType);
    The linker error is coming for second argument when I try to call the function from client.
      error LNK2001: unresolved external symbol "int __cdecl MyMessageBox(class ATL::CStringT<unsigned short,class StrTraitMFC_DLL<unsigned short,class ATL::ChTraitsCRT<unsigned short> > > &,class ATL::CStringT<unsigned short,class
    StrTraitMFC_DLL<unsigned short,class ATL::ChTraitsCRT<unsigned short> > > &,int)" (?MyMessageBox@@YAHAAV?$CStringT@GV?$StrTraitMFC_DLL@GV?$ChTraitsCRT@G@ATL@@@@@ATL@@0H@Z)
    Use Dependency Walker (http://www.dependencywalker.com/) or dumpbin to discover the decorated name under which the function is actually exported from the DLL, compare with the one the linker
    is complaining about.
    What compiler version are you using? Seeing "unsigned short" where one would expect wchar_t is suspicious. VC6 did that (lacking a built-in wchar_t type), but it wouldn't have things like StrTraitMFC_DLL. I suspect you are building one of the
    two modules with /Zc:wchar_t- (Project > Properties > C/C++ > Language > Treat wchar_t As Built-in Type = No).
    Igor Tandetnik

  • Using a variable in a js function argument

    Folks,
    This is very basic, but I still cannot get it...
    I have this js function in an ASP page:function MM_changeProp(objId,x,theProp,theValue) { //v9.0
      var obj = null; with (document){ if (getElementById)
      obj = getElementById(objId); }
      if (obj){
        if (theValue == true || theValue == false)
          eval("obj.style."+theProp+"="+theValue);
        else eval("obj.style."+theProp+"='"+theValue+"'");
    }i don't understand the function, as it was put in automatically by dreamweaver. right now, i am using this onclick event of an image:<div id="apDiv19" onclick="MM_changeProp('apDiv7','','backgroundColor','#FFFF00','DIV')"></div>the #FFFF00 is the color YELLOW. it is being passed to the theValue argument of the js. what i simply want to do is establish a global variable that will house a color string (like #FFFF00), and then use it in the function argument everytime i need the function. something like this:<div id="apDiv19" onclick="MM_changeProp('apDiv7','','backgroundColor',VARIABLE,'DIV')">i do not know how to do two things:
    1) initialize and assign the variable a value, and where to establish it (inside the script tags? in the head? in the body?)
    2) how to use the variable as an argument in the function
    any help greatly appreciated for this novice. thanks!

    ajetrumpet wrote:
    Folks,
    This is very basic, but I still cannot get it...
    I have this js function in an ASP page:This forum is not about ASP nor JavaScript. Please use Google to find an appropriate JavaScript forum.

  • What is the difference between variable and Define

    WHAT IS THE DIFFERENCE BETWEEN
    these different declarations when it is done using the keyword "variable" and "define"
    and both of these are done OUTSIDE "DECLARE"
    VARIABLE g_monthly_sal NUMBER
    DEFINE p_annual_sal =5000
    -- I understand that p_annual_sal will be taken as a CHAR.
    -- ALSO IF DEFINE variable acts as macro variable, SO is it necessary to give it some value whenever we define it.
    if not what value would be substituted for it?
    OR does that mean whenever we want to specify data type for a bind varible we should use VARIABLE and
    when we do not want to specify type we use DEFINE?
    THANK YOU
    Edited by: user6287828 on Feb 24, 2009 11:03 AM
    Edited by: user6287828 on Feb 24, 2009 11:04 AM

    Both are SQL*plus commands. In a real programming environment you will not use such constructs (except a few rare scripting cases).
    The difference is how the construct is later used. DEFINE is more like a copy&paste string. Whereever the name of this substitution variable is found it will be pasted into the sql*plus session.
    VARIABLE creates a real variable. You can change the value and if follwos the usual principles of variables (including binding).
    Example can be found the docs:
    from the docs
    Where and How to Use Substitution Variables
    You can use substitution variables anywhere in SQL and SQL*Plus commands, except as the first word entered. When SQL*Plus encounters an undefined substitution variable in a command, SQL*Plus prompts you for the value.
    You can enter any string at the prompt, even one containing blanks and punctuation. If the SQL command containing the reference should have quote marks around the variable and you do not include them there, the user must include the quotes when prompted.
    SQL*Plus reads your response from the keyboard, even if you have redirected terminal input or output to a file. If a terminal is not available (if, for example, you run the script in batch mode), SQL*Plus uses the redirected file.
    After you enter a value at the prompt, SQL*Plus lists the line containing the substitution variable twice: once before substituting the value you enter and once after substitution. You can suppress this listing by setting the SET command variable VERIFY to OFF.
    Using Bind Variables
    Bind variables are variables you create in SQL*Plus and then reference in PL/SQL or SQL. If you create a bind variable in SQL*Plus, you can use the variable as you would a declared variable in your PL/SQL subprogram and then access the variable from SQL*Plus. You can use bind variables for such things as storing return codes or debugging your PL/SQL subprograms.
    Because bind variables are recognized by SQL*Plus, you can display their values in SQL*Plus or reference them in PL/SQL subprograms that you run in SQL*Plus.
    Creating Bind Variables
    You create bind variables in SQL*Plus with the VARIABLE command. For example
    VARIABLE ret_val NUMBER
    This command creates a bind variable named ret_val with a datatype of NUMBER. See the VARIABLE command for more information. (To list all bind variables created in a session, type VARIABLE without any arguments.)
    Referencing Bind Variables
    You reference bind variables in PL/SQL by typing a colon (:) followed immediately by the name of the variable. For example
    :ret_val := 1;
    To change this bind variable in SQL*Plus, you must enter a PL/SQL block. For example:
    BEGIN
    :ret_val:=4;
    END;
    /

  • How to use a variable between interfaces or class?

    Hello All;
    Far by now I can say that the forum is very helpful for me. Thanks for all the people who have the time and generosity to help our problems. Thank you.
    Unfortunately I have a problem <Again :( >
    I want to use a variable in two different *.java files.
    Is it possible?
    The Variable i want to use is; int CiftSayisi
    The variable is declared in the CamCalib.Java under a button's Action Listener.
    Here is the code;
    public void actionPerformed(ActionEvent arg0) {
                        ImagePair.main(null);
                        String[] ImPath = list.getItems();                                           //Storing Items in an Array
                        Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();                     //Dimensions of the Screen Storing in an object
                        int ScreenHeight = dim.height;                                           //Definition ScreenHeight
                        int ScreenWidth = dim.width;                                          //Definition ScreenWidth
                        // System.out.println(ScreenHeight);                                                    //Testing of the Dimensions
                        // System.out.println(ScreenWidth);                                                     //Testing of the Dimensions
                        int CiftSayisi = ImPath.length -1 ;
                        if (CiftSayisi == 0){
                             System.out.println("Added Images do not Construct a Pair");
                        else {
    }Now i want to use it in another java file which is ImagePair.Java in the loading part of the interface;
                 setType(Type.UTILITY);
              setTitle("Image Pair Selection");
              setResizable(false);
              setAlwaysOnTop(true);
              setBounds(100, 100, 450, 68);
              contentPane = new JPanel();
              contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
              setContentPane(contentPane);
              contentPane.setLayout(null);
              textField = new JTextField();
              textField.setBounds(61, 11, 22, 20);
              textField.setEditable(false);
              textField.setEnabled(false);
              contentPane.add(textField);
              textField.setColumns(2);I have a text field in here that i need to fill with the value of CiftSayisi
    Any help please?
    ömer kaya
    METU-GGIT
    Edited by: Ömer K. on Apr 10, 2012 12:43 AM

    I didn't bother reading the code, since you didn't format it.
    But to answer your question (if I understand it correctly), yes, it is possible to pass variables between different object instances (not from an interface specifically, since interfaces don't have members). The simplest way to pass the variable as an argument to a method or constructor. If these aren't available, you could create a static global variable, though in a multithreaded app you'd have to synchronize access.

  • Variable list of parameters in PL/SQL functions

    As I know, PL/SQL decode function can be called with
    variable number of parameters:
    decode (a, b, c);
    decode (a, b, c, d, e);
    decode (a, b, c, d, e, f, g);
    How is is possible to implement a PL/SQL procedure or function like decode, which is usable with a variable list
    of arguments.
    Is there another way instead of using overloading?
    Thanks in advance
    Stefan Richter

    Implement it with the IF..ELSIF condition.

  • Call function in LabView from a DLL, then access global variable from DLL

    I have created a DLL in LabWindows with a function and a structure.  I want to call the function from within LabView and then access the global structure.  I am able to call the function from the DLL with a "Call Library Function Node" and can access the return value, but I cannot figure out how to access the global structure.  The structure is declared in the DLL header file with __declspec(dllimport) struct parameters.
    Is there any way of accessing this structure without using the Network Variable Library?
    Solved!
    Go to Solution.

    dblok wrote:
    When you say "access to" or "the address of" the global variable, do you mean to pass the variable as an argument to the function call in the DLL?  If so, then I was not really sure how to pass a cluster from LabView by using the "Call Library Function Node".
    Yes, that's exactly right.  I would include a pair of helper functions in the DLL to read and write the global variable.  Alternatively you might write separate helper functions for each field inside the global structure, depending on the number of fields and whether you want to do any validation on the values.
    You can pass a cluster by reference to a function that expects a struct by setting the parameter to Adapt to Type, so long as the cluster does not contain any variable-length elements (strings or arrays).  The cluster needs to match the struct exactly, and sometimes that involves adding extra padding bytes to make the alignment work.  Variable-length elements in LabVIEW need to be converted to clusters containing the same number of elements as the struct definition (for example, if your struct contains char name[12], you would create a cluster of 8 U8 values, and you could use String to Array of Bytes followed by Array to Cluster to convert a LabVIEW string into that format).  If the struct contains pointers it gets more complicated, and it may be easier to write functions in the DLL to access those specific elements individually.
    If you can't get this working or need help, post your code and an explanation of the error or problem you're seeing.
    EDIT: it is also possible to include a single function in the DLL that returns the address of the global variable, which LabVIEW can then use to access and modify the data, but that's more complicated and likely to lead to crashes if you don't get the memory addressing exactly right.

  • JSP and Instance Variables

    I have some questions about JSP presentation (Interactive Component Call in Screenflow):
    - Only BPM Objects are possible to be mapped in JSP?
    - Is possible to map two or more BPM Objects to the JSP?
    - What is the difference of mapping using the variable "attributes" in argument mapping and the option "Select BPM object variable" in main task of Interactive Component Call activity?

    I seem to be having a similar problem.
    If I include this fragment, for an instance variable called "contacts" which is a BPMObject of type "ITSSContactRequest".
    <%
    Object r = request.getAttribute("contacts");               
    Class cl = r.getClass();
    out.println(cl.getName());
    %>
    I get the following output:
    xobject.ITSSContactManagement.ITSSContactRequest
    and I can access the object via reflection:
    <%
    Object r = request.getAttribute("contacts");               
    Class cl = r.getClass();
    out.println(cl.getName());     
    Method getGeneralContacts = cl.getMethod("getGeneralContacts", null);               
    Object rv = getGeneralContacts.invoke(r);
    %>
    and access the rv variable accordingly.
    However, if I try and cast the variable directly:
    <%
    Object r = request.getAttribute("contacts");
    Class cl = r.getClass();               
    out.println(cl.getName());
    xobject.ITSSContactManagement.ITSSContactRequest rq = (xobject.ITSSContactManagement.ITSSContactRequest)r;
    %>
    I get the following error message:
    "The task could not be successfully executed. Reason: 'fuego.web.execution.exception.InternalForwardException: UnExpected error during internal forward process.'.
    See log file for more information [Error code: workspace-1258985548580] "
    The same error occurs if I try and import the object via
    <%@ page import="xobject.ITSSContactManagement.ITSSContactRequest" %>
    Thanks for any help.

Maybe you are looking for