I'm currently working with SOAP::Lite but I don't happen to have that code (the provided Chat.pl file) in front of me at the moment.
From what I understand however design wise you could build a single Application that is both a "server" and a "client".
It would work like this. User A and User B both run the application. A's app exposes a postMessage() method on port 80 (via SOAP) and Client B's app access this method. On the other end B's app does exactly the same thing, while A access the Method.
This should work in general design issues (and I think most of the code is on the www.soaplite.com site) but standard disclaimers apply.