What is SOAP?

SOAP is an XML-based messaging protocol. It defines a set of rules for structuring messages that can be used for simple one-way messaging but is particularly useful for performing RPC-style (Remote Procedure Call) request-response dialogues. It is not tied to any particular transport protocol though HTTP is popular. Nor is it tied to any particular operating system or programming language so theoretically the clients and servers in these dialogues can be running on any platform and written in any language as long as they can formulate and understand SOAP messages. As such it is an important building block for developing distributed applications that exploit functionality published as services over an intranet or the internet.

Let’s look at an example. Imagine you have a very simple corporate database that holds a table specifying employee reference number, name and telephone number. You want to offer a service that enables other systems in your company to do a lookup on this data. The service should return a name and telephone number (a two element array of strings) for a given employee reference number (an integer). Here is a Java-style prototype for the service:

String[] getEmployeeDetails ( int employeeNumber );


Continue reading »


Using PHP to send SMS through HTTP

iphone_largeThere are an infinite number of reasons why you might want to use PHP to send SMS. You might want to add a “send by SMS” option to your headlines, you might want to provide 24/7 support in which your technician is alerted by SMS or you might want to provide your viewers with Free SMS to drive traffic to your site.

Although it is possible to send SMS via e-mail, which we will cover another time, this tutorial will focus on the use of HTTP methods “get” & “post”. For those of us that many not know this, using HTTP basically means the use of forms, just like a contact form, except that these will be submitted automatically as opposed to manually.

Although this tutorial can be used for any gateway that provides access via HTTP, it is based on TM4B SMS Gateway because a) they are the only gateway i know that have a ’simulation’ mode for tweaking your scripts, b) they don’t have any set-up fees and their prices are low, and c) they are reliable and i use them.

Continue reading »