We present a microscopic theory for the dc Josephson effect in model m
esoscopic constrictions. Our method is based on a nonequilibrium Green
function formalism which allows for a self-consistent determination o
f the order parameter profile along the constriction. The various regi
mes defined by the different length scales (Fern-Li wavelength lambda(
F), coherence length xi0, and constriction length L(C)) can be analyze
d, including the case where all these lengths are comparable. For lamb
da(F) less than or similar (L(C), xi0) phase oscillations with spatial
period lambda(F)/2 can be observed. For L(C) > xi0 solutions with a p
hase-slip center inside the constriction can be found, in agreement wi
th previous phenomenological theories.