Using iMessage on iPhone 4 without phone service?

A couple months ago my phone had service, but due to it being so expensive, I had to stop paying. After it was shut off, I was still able to text my friends that I messaged before. Is there a way to message other people that use iMessage without phone service?

As long as they have an iPhone their iMessages turned on and you were around a Wi-Fi network