Saw Deerslayers post on the same problem, plus many other customers who want to disable intrusive incoming Text messages. My reply:
After several CS agents assured me for 3 days that they were working on disabling text on my account, and giving me a repair ticket number rather than say they could not do it, I finally received an unacceptable answer that it was baked into the Xfinity Voice non-cell service and cannot be disabled. But there must be a business decision not to let customers opt out of Text Messaging on their Voice service, even when it is a ported number from Verizon landline service w/o Text. They do not want their customers to opt out of that particular voice feature but will allow opting out of call waiting and voicemail. Go figure. Of Course It's Possible To Allow It To Be Disabled!
I'm faced with having to explore alternate carriers for my landline service, after all the sturm and drang of activating my voice service, porting my number from Verizon, and THEN trying to disable all the automatically activated intrusive features that my Verizon service was blessedly free of.
There should, at least, be an ability to block incoming numbers that text you, as there is for voice callers, I sure can't find such an ability. Good luck!