ReturnType rettype = request.getReturnType();
final ShippedVariable shiped;
if(ENV_NOWRAP_VARSHIP || !rettype.isRemoteSequnece()) {
shiped = new ShippedVariable(varname, new MarshalledSequence(result, dynEnv));
} else {
final RemoteSequenceProxy proxy = new RemoteSequenceProxy(result, request);
try {
UnicastRemoteObject.exportObject(proxy, 0, TimeoutSocketProdiver.createClientSocketFactory(), TimeoutSocketProdiver.createServerSocketFactory());
} catch (RemoteException e) {
throw new XQueryException("failed exporting variable: " + varname, e);
}