Usually, SOAP implemented in the most of web based applications, but few of it used as the part of the application modules. Why? Because it is so complicated, I guess. The SOAP technique require server’s RPC (Remote Procedure Call) before it can connect to the databases. This thing is always left by the programmers since it will decrease the application performance.
However, I’ll give you an example how to create SOAP based application instead of the RPC it self. I developed this using PHP programming (even it is wide large support also by the ASP programming). To reduce both the code size and your head ache, I’ll implemented a class named nusoap.php which available at http://dietrich.ganx4.com/nusoap.
What you need is to create both the client and the server module. The client module is a part of the front-end while the server module is a part of the back-end. To shorten this post, I’ll just explained you a module which process the login validation.
In the server module, you have to create the server object, register the lookup service and finally send the result as a SOAP response over HTTP.
// create the server object
$server = new soap_server;
// register the lookup service
// send the result as a SOAP response over HTTP
In the client module, you have to define the parameter also the server file target, create client object, run the RPC backstage, and finally release it after accepting the response.
// define the parameter
// define the
server file target
// method namespace-nya
// create client object
$client = new soapclient($serverpath);
// run the RPC
// kill object
So simple isn’t it? Not exactly the hard code you expected before. Please have a try and share your experiences.
PS: If you've benefit from this blog,
you can support it by making a small contribution.