  [Abridged] We present more than 4 years of Swift X-ray observations of the
2013 superoutburst, subsequent decline and quiescence of the WZ Sge-type dwarf
nova SSS J122221.7-311525 (SSS122222) from 6 days after discovery. Only a
handful of WZ Sge-type dwarf novae have been observed in X-rays, and until
recently GW Lib was the only binary of this type with complete coverage of an
X-ray light curve throughout a superoutburst. We collected extensive X-ray data
of a second such system to understand the extent to which the unexpected
properties of GW Lib are common to the WZ Sge class. We analysed the X-ray
light curve and compared it with the behaviour of superhumps which were
detected in the optical light curve. We also performed spectral analysis of the
data. The results were compared with the properties of GW Lib, for which new
X-ray observations were also obtained. SSS122222 was variable and around five
times brighter in 0.3-10 keV X-rays during the superoutburst than in
quiescence, mainly because of a significant strengthening of a high-energy
component of the X-ray spectrum. The post-outburst decline of the X-ray flux
lasted at least 500 d. The data show no evidence of the expected optically
thick boundary layer in the system during the outburst. SSS122222 also
exhibited a sudden X-ray flux change in the middle of the superoutburst, which
occurred exactly at the time of the superhump stage transition. A similar X-ray
behaviour was also detected in GW Lib. This result demonstrates a relationship
between the outer disc and the white dwarf boundary layer for the first time,
and suggests that models for accretion discs in high mass ratio accreting
binaries are currently incomplete. The very long decline to X-ray quiescence is
also in strong contrast to the expectation of low viscosity in the disc after
outburst.
