dominos
dominos

Reputation: 412

Porting java interface to IDL

I have a java RMI app that I want to port to using CORBA. To do that, I have to change the remote interface definition from java to IDL but I'm not exactly sure how to do that.

At the moment one of the methods in the java interface has a parameter that is not a predefined datatype (like string, int etc) but one that I defined myself. In the java interface you would define it like that:

public int doSomething(MyObject o);

In the RMI implementation passing of the object is made possible because both the client and server have the definition of class MyObject on their build path.

So I am wondering if it would work if I put the MyObject files on both client and server and then change the method definition in IDL to something like this:

long doSomething(in MyObject o);

Or do I need to define this class and its methods somehow also in the IDL?

Upvotes: 0

Views: 350

Answers (2)

hhafez
hhafez

Reputation: 39750

You need to define MyObject in your idl module well. It's not sufficient to have the class defined in the build path for both client and server.

Upvotes: 1

user207421
user207421

Reputation: 310893

rmic -idl will do that for you. See the tools documentation.

Upvotes: 3

Related Questions