How to use corba array?
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   weini_lu
Posted On:   Tuesday, October 15, 2002 07:02 AM

hi, i don't know how to use corba array. \IDL file module Compute{ typedef double mytype[4]; interface Addmanager{ double op(in mytype value); }; }; \client.java import java.applet.*; import Compute.*; public class Add1 { public org.omg.CORBA.ORB orb; private byte[] managerId; private Compute.Addmanager manager; private String sleepInterval = "1100"; private Entry entry; public static void main(String[] args){ orb = org.omg.CORBA.ORB.init(args,null); managerId = "Addmanager".getBytes(); manager = Compute.AddmanagerHelper.bind(orb,"/compute_poa", managerI   More>>

hi,
i don't know how to use corba array.
\IDL file
module Compute{
typedef double mytype[4];
interface Addmanager{
double op(in mytype value);
};
};

\client.java
import java.applet.*;
import Compute.*;

public class Add1 {
public org.omg.CORBA.ORB orb;
private byte[] managerId;
private Compute.Addmanager manager;
private String sleepInterval = "1100";
private Entry entry;

public static void main(String[] args){
orb = org.omg.CORBA.ORB.init(args,null);
managerId = "Addmanager".getBytes();
manager = Compute.AddmanagerHelper.bind(orb,"/compute_poa", managerId);
double data = 10.0;
double num=0;
double[] x = new double[4];
try{
for (int i = 0; i < x.length; i++) {
x[i] = data;
}

num = manager.op(x);
}catch(Exception e){
System.out.println(e);
}
System.out.println(num);
}

}

\error
org.omg.CORBA.BAD_OPERATION: minor code: 1330446336 completed: No

   <<Less
About | Sitemap | Contact