From S&W's web site:
Q: Can I dry fire my Smith & Wesson?
A: Yes, except for the .22 caliber pistols which includes models 22A, 22S, 422, 2206, 2214, 2213 and 41.
.22 caliber revolvers such as models 17, 43, 63, 317 and 617 also should not be dry fired.
Q: Why can't I dry fire my .22 pistol or revolver?
A: Dry firing a S&W .22 pistol or revolver will cause damage to the firing pin.
On the other hand, the old instruction sheet that came with the K22s, Model 17s and Model 18s said this:
"Practice "dry shooting" with empty gun."
I have never used snap caps, wall anchors, or any other similar device, preferring instead to trust the factory. I have been dry firing my K22 (without wall anchors or snap caps) since the 1960s with no ill effects.
I always understood, from talking to the factory about this, that the frame mounted firing pin was designed not to protrude through the bolster face enough to strike the shoulder of the charge holes in the cylinder.
That said, don't do what I do. Do what the current factory advice says on their web site.