do {
OutputStream out = (OutputStream)
target._request(operation, responseExpected);
for (int i = 0; i < arguments.count(); i++) {
NamedValue nv = null;
try {
nv = arguments.item(i);
}
catch (org.omg.CORBA.Bounds ex) {
throw new org.omg.CORBA.INTERNAL("concurrent modification");
}
switch (nv.flags()) {
case ARG_IN.value:
case ARG_INOUT.value:
Any value = nv.value();
value.write_value(out);
}
}
InputStream in = null;
try {
in = (InputStream) target._invoke(out);
if (!responseExpected) {
return;
}
org.omg.CORBA.Any return_value = return_value();
TypeCode tc = return_value.type();
if (return_value != null && tc != null) {
// create return value
return_value.read_value(in, tc);
}
for (int i = 0; i < arguments.count(); i++) {
NamedValue nv = null;
try {
nv = arguments.item(i);
}
catch (org.omg.CORBA.Bounds ex) {
throw new org.omg.CORBA.INTERNAL("concurrent modification");
}
switch (nv.flags()) {
case ARG_OUT.value:
case ARG_INOUT.value:
org.omg.CORBA.Any value = nv.value();
value.read_value(in, value.type());
}
}
}