An IDL file declares some structure types and one interface which has some methods taking structures as arguments. How will a client access these structures?

piyush sheth

If you are using Java on the client side, simply import and use the Java classes generated by the IDL compiler.

For example, if you have following IDL declaration:

struct Employee
   long empId;
   string empName;
the IDL compiler will generate a final class with public members and an empty constructor.

In your Java program, access it as follows:

Employee emp = new Employee();
emp.empId = 23;
emp.empName = "Hero";
About | Sitemap | Contact