If you want to study webservices, you should have a basic understanding of the following:
- HTML
- XML
According to http://www.w3schools.com web services are:
- Web services are application components
- Web services communicate using open protocols
- Web services are self-contained and self-describing
- Web services can be discovered using UDDI
- Web services can be used by other applications
- XML is the basis for Web services
However, this fact may be confusing when read by newbie. Let's look closer on this topic:
Imagine this situations, you have a functionality based on PHP eg. eshop. Then you got an offer to extend your eshop by products from a regular shop using oracle database and c++ application. How could you include items stored in Oracle DB into your eshop. Certainly there are several possibilities, and one of them is a web service. There could be created a oracle procedure or set of procedures that would serve like access point into oracle database for searching. Once we have such procedure web services technology takes place. Web services take care of communication between eshop created in PHP and oracle procedure. Oracle procedure is a basic element of our new web service. We have to describe all possibilities it has otherwise eshop (lets call it client) doesnt now how to communicate. Description of webservice is made as WSDL file and is made in WSDL language.
WSDL language is based on XML. It describes:
- which actions service offers - imagine we have web services 'database access' and services are insert, update, delete, ...
- what are arguments action accepts and returns. Arguments may also be complex types (structured).
- where exactly is the service placed (URL)
- protocol used for communication - mostly SOAP
Generaly, when you have WSDL file, you know everything to be able to build a client and communicate with the service.
When you theretically know how to communicate (based on WSDL file) you may continute to practical part - building and sending messages.
SOAP is the most used alternative - a simple XML-based protocol to let applications exchange information over HTTP.
It is an envolepe carrying data.
Generaly we may say:
HTTP + XML = SOAP
Example of a SOAP request [http://www.w3schools.com/soap/soap_example.asp]:
And that's it.
Know we can
- create a request in appropriate XML format based on rules in WSDL file
- send request enveloped by SOAP protocol to webservice located at URL defined in WSDL file by HTTP POST/GET
- then read a reasponse from web service again in XML format
Here is an example of PHP web service client that is created based on WSDL:


