Hi!
I have a problem using JacORB with complex return types and I can't solve it.
My IDL Definition is (shorted):
I´ve implemented both classes using the tie approach, my Java code looks like this:
Now I really don´t know, how I can return an object that implements the interface Session (JacORB created for both classes "Bank" and "Session" die Java classes/interfaces "*", "*Helper", "*Holder", "*Operations", "*POA", "*POATie").
I just can't return something like
because SessionPOATie does not implement the interface Session. Even more, no generated class does this! So I do not know how to return just an object that implements Session. (The "father" object "Bank" I can look up well using a nameservice (exactly like described in the Tut), but I don’t want to give each member of the father object a separate name, of course.
Can anybody help me?
Thank you very much for your help,
Vasilios
I have a problem using JacORB with complex return types and I can't solve it.
My IDL Definition is (shorted):
Code:
interface Session;
interface Bank
{
Session GetSession();
void DropSession(in Session theSession);
};
interface Session
{
Account GetAccount(in long accountID, in string pin);
};
I´ve implemented both classes using the tie approach, my Java code looks like this:
Code:
public class BankOpImpl implements BankOperations
{ ...
public Session GetSession()
{
...
}
...
}
Now I really don´t know, how I can return an object that implements the interface Session (JacORB created for both classes "Bank" and "Session" die Java classes/interfaces "*", "*Helper", "*Holder", "*Operations", "*POA", "*POATie").
I just can't return something like
Code:
return new SessionPOATie(new SessionOpImpl());
because SessionPOATie does not implement the interface Session. Even more, no generated class does this! So I do not know how to return just an object that implements Session. (The "father" object "Bank" I can look up well using a nameservice (exactly like described in the Tut), but I don’t want to give each member of the father object a separate name, of course.
Can anybody help me?
Thank you very much for your help,
Vasilios