Follow the Leader: Till Eulenspiegel once conned a German noble in the same way. Andersen uses a similar premise, but Till managed to convince the nobleman that he actually painted a blank wall ("only the ones of true nobility can see it, your highness").
There is also the Norwegian tale (Gullible Men And Mean Wives) of the wife who tricked her husband to walk naked in his neighbor´s funeral, telling him that he had new clothes on. The point here was that the wives set up a bet on which of them had the most gullible husband. The premise is similar in this case.