You'll need a few things before you get started:
- Rear wiper switch. Easy to find in a pick-n-pull junkyard in a later model XJ Cherokee, they use the same one as the TJ.
- Rear defroster switch. Ditto on the XJ Cherokee.
- Plug to mate with the plug on the hardtop. Since it is unlikely you'll be lucky enough to find a TJ in the junkyard with the harness and plug, for the later model hardtop you have a compatible plug can be found connecting the power seats of a Dodge Durango or Dakota. (If you had an earlier hardtop, a plug compatible with that one could be found under the dash of an XJ, behind the glove box, it's lime green in the XJ).
- Factory wiring diagram. You should be able to find one somewhere on the web if you don't have the factory service manual.
- Assorted wire and wiring supplies.
Once you've acquired all of those items, you should be able to use the factory wiring diagram to make the harness. It's pretty straightforward.
BTW, connecting up the rear washer is a little more complicated, IIRC there's a second pump motor that gets installed on the wiper reservoir to pump fluid to the rear washer. You'd need to find a compatible wiper pump.
Does that give you enough to go on?
"Whether you think you can do something or you think you can't, you are right" - Henry Ford