Solution (source code)

= Solution

<Hydrostatic pressure> varies with height as $p_l-p_{\rm atm}=-\rho gz$ when the far flat bath is the zero-height reference. <Surface tension> balances that pressure jump by <curvature>; with the <curvature> sign chosen in the equation this becomes $\rho gz=\sigma\kappa$. Here $\rho$ is liquid <mass density>, $g$ <gravitational acceleration>, $\sigma$ <surface tension> and $\kappa$ the signed planar <curvature>. The <capillary length> $\ell_c=\sqrt{\sigma/(\rho g)}$ balances these effects. Scale both physical $z$ and $h$ by $\ell_c$ to obtain
$$
\boxed{z=h_{zz}(1+h_z^2)^{-3/2}.}
$$
For the wall-rising <meniscus> $h$ decreases as $z$ rises. At the distant bath, $z\downarrow0$, $h\to\infty$ and $h_z\to-\infty$, because the free surface becomes horizontal when expressed as $z(x)$. In the first integral this gives $\boxed{A=-1}$.

At zero wall <contact angle> the interface is tangent to the vertical wall. In the representation $x=h(z)$ this means $h(z_0)=0$ and $h_z(z_0)=0$, so $z_0^2/2-1=0$. The rising contact point is $\boxed{z_0=\sqrt2}$. Put $q=z^2/2-1$. Then $h_z=q/\sqrt{1-q^2}=\sqrt2(z-z_0)+O((z-z_0)^2)$. Integration from the contact point gives
$$
\boxed{h(z)\sim\frac{(z-z_0)^2}{\sqrt2}.}
$$
The sign of $h_z$ is negative on the approach from below, while $h$ is positive, as required by the geometry. This local quadratic shape is the <zero-contact-angle wall meniscus> matching law.