Before inventing of web services, whenever we need to get data from particular website, first we visits a website and with help of HTTP request is send to server from web browsers and server responses display to the visitor. Now days this scenario has been changed. You don’t need to visit the particular website to use their service and functionality if they are providing web services. Web services are set of platform independent functions/APIs which can be used from remote server over the Internet. In web services there are two parties are involved one is provider (Server) and other is consumer(Client).There are three types of web services available.
Types of Web Services
Checkout other Web service Tutorials,
Soap is wonderful technology that can help you in developing great applications, Its formerly known as Simple Object Access Protocol (until the acronym was dropped in version 1.2). SOAP is an XML-based web service protocol. In other word SOAP is a simple XML-based protocol to provide functionality to applications exchange information over HTTP.SOAP are using SOAP-Envelope to transfer information’s. It has typical architecture to create web services.
In PHP 5, there is built-in extension for the providing and consuming web services. But there are many library also available to create soap based web services in PHP.
The SOAP extension implements a large subset of SOAP 1.1, SOAP 1.2 and WSDL 1.1 specifications.
XML RPC is another useful technique of providing and consuming web services. It is using HTTP for transport and XML for encoding decoding the remote procedure call along with its parameter. You can visit the official website www.xmlrpc.com to know more about XML-RPC.XML-RPC has simple designed architecture and allowing allowing complex data structures to be transmitted, processed and returned.
There are many functions which is responsible to set request and get response but mainly there two functions
xmlrpc_decode_request() used to encode and decode XML-RPC request and response.
- Support for creating both xmlrpc clients and servers
- Fully automated or fully manual, fine-grained encoding and decoding from php values to xmlrpc
- Support for
- Support for http compression of both requests and responses, cookies, proxies, basic auth and https, ntlm auth and keepalives with the php cURL extension
- Optional validation of parameter types of incoming xmlrpc request
- Support for system.listMethods, system.methodHelp, system.multicall and system.getCapabilities methods
- Support for the
extensions to xmlrpc
- Possibility to register php function or class methods as webservices, extracting value-added information from phpdoc comments
- A web based visual debugger is included with the library
Its easiest technology to develop web services. Its stand for Representational State Transfer (REST). Nowadays, it’s very becoming popular in the arena of web services. There is no need to use XML data interchange format for request and response.
The REST web services can be return XML, JSON or even in HTML format response. PHP already has many functions to handle these type response or request like DOM functions,
SimpleXML functions and Json encode/decode functions.
REST architecture is basically focused on two things:
- Resources : Its application functionality which is represented by a unique URL.
- Interface : its HTTP methods works as an interface to access the resources.
If you have any questions or queries,Please comment here.