Creating Web Services with PHP and SOAP – Part 1


Building a SOAP Server

It couldn’t be easier to get NuSOAP up and running on your server; just visit, download and unzip the package in your web root direoctry, and you’re done. To use the library just include the nusoap.php file in your code.

For the server, let’s say we’ve been given the task of building a service to provide a listing of products given a product category. The server should read in the category from a request, look up any products that match the category, and return the list to the user in a CSV format.

Create a file in your web root named productlist.php with the following code:

Building a SOAP Client

Then create productlistclient.php as follows

Now go to http://localhost/webservice/productlistclient.php

View original post


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s