Been there, done that. For my case, it was a matter of sending an XML request document over HTTP, and receiving an XML response in reply, containing messages. But that was the API the carrier we were using was providing us. Different carrier, different API, I presume.