Hi i'm quite new to corba.
I need to implement Add.idl, but i can't find something similar on the
net, or some closer examples.
The idea is to implement the interface Add to store an array of
results (the sum of a and b). The client sends a and b to the server
and the server sends back an Add object that contains the resulting
sum (this is a must, this is how it should be done, i know i could do
this easier, also found examples here: http://java.sun.com/developer/technicalArticles/releases/corba/
).
Could anyone give some links to achieve this, or code, or try to do
this together on this thread?
Here is my idl:
//Add.idl
module ArithApp {
interface Add;
typedef sequence <Add> AddJob;
const unsigned short SIZE=10;
typedef long array[SIZE];
interface Add
{
AddJob addArrays(in array a, in array b);
};
};
Thanks for your time.
Mark Woyna - 05 Dec 2007 14:42 GMT
On Dec 5, 3:27 am, "develo...@gmail.com" <develo...@gmail.com> wrote:
> Hi i'm quite new to corba.
> I need to implement Add.idl, but i can't find something similar on the
[quoted text clipped - 27 lines]
>
> Thanks for your time.
The 'Add' interface does not contain any attributes, so there's no way
it can carry a result back to the caller. It's role appears to be a
service-type object, since it contains only operations. Why don't you
change the return type to a long?
Also, I don't believe the 2nd typedef is syntactically correct. It
should be:
typedef long[SIZE] longArray;
interface Add {
long addArrays(in longArray a, in longArray b);
};
Mark