RPCParam param = new RPCParam(returnQName, objRes);
param.setParamDesc(operation.getReturnParamDesc());
if (!operation.isReturnHeader()) {
resBody.addParam(param);
} else {
resEnv.addHeader(new RPCHeaderParam(param));
}
}
// Then any other out params
if (!outs.isEmpty()) {
for (Iterator i = outs.iterator(); i.hasNext();) {
// We know this has a holder, so just unwrap the value
RPCParam param = (RPCParam) i.next();
Holder holder = (Holder)param.getValue();
Object value = JavaUtils.getHolderValue(holder);
ParameterDesc paramDesc = param.getParamDesc();
param.setValue(value);
if (paramDesc != null && paramDesc.isOutHeader()) {
resEnv.addHeader(new RPCHeaderParam(param));
} else {
resBody.addParam(param);
}
}
}