dpud is not so well documented.
you need to add handling for GET_NEXT and GET_INTERMEDIATE
You might get a clue from this..
} else if (purpose == nxopen.uf.UFDpud.Purpose.GET_NEXT) {
double proj[] = {0.0,0.0,-1.0};
drpos0 = dpSess.askDrpos0(dpudPtr);
coord =...