Documente Academic
Documente Profesional
Documente Cultură
mqwertyuiopasdfghjklzxcv
bnmqwertyuiopasdfghjklzx
cvbnmqwertyuiopasdfghjkl
WEB SERVICES
zxcvbnmqwertyuiopasdfghj
klzxcvbnmqwertyuiopasdfg
-Shivani
hjklzxcvbnmqwertyuiopasd
fghjklzxcvbnmqwertyuiopa
sdfghjklzxcvbnmqwertyuio
pasdfghjklzxcvbnmqwertyu
iopasdfghjklzxcvbnmqwert
yuiopasdfghjklzxcvbnmqwe
rtyuiopasdfghjklzxcvbnmq
wertyuiopasdfghjklzxcvbn
mqwertyuiopasdfghjklzxcv
bnmqwertyuiopasdfghjklzx
What is web services
Web services are open standard (XML, SOAP, HTTP etc.) based
Web applications that interact with other web applications for the
purpose of exchanging data.
Request service
Service Service
Provider Service response Consumer
WHAT IS SOAP & WHAT IS RESTFUL
As the same web service can be used across wide variety of devices
if the service is checked
Once independent of device then it can be safe to use for all devices.
Where
Where
can consumer
can consumer
find WSDL
find WSDL
? ?
Provider can list their url for wsdl in UDDI registry service or they can
directly send the wsdl file url to consumer. UDDI is the registry service
that is used to establish contact between a client and an appropriate
web service server.
<?xml version=1.0?>
Syntax of Soap envelope
<?xmlversion="1.0"?>
<soap:Envelope
xmlns:soap="http://www.w3.org/2003/05/soap-envelope/"
soap:encodingStyle="http://www.w3.org/2003/05/soap-encoding">
<soap:Header>
</Soap:Header>
<soap:Body>
<soap:Fault>
</soap:Fault>
<soap:Body>
</soap:Envelope>
WHAT IS REST
REST Representational State Transfer . The name implies that when the
client sends a request to the server ,the server sends back the
representation of the resource in HTML,XML,JSON,Plain
Text,PDF,JPEG format.
Representational State Transfer (REST) is an architecture principle in
which the web services are viewed as resources and can be uniquely
identified by their URLs. The key characteristic of a RESTful Web
service is the explicit use of HTTP methods to denote the invocation
of different operations
The basic REST design principle uses the HTTP protocol methods for
typical CRUD operations:
POST - Create a resource
GET - Retrieve a resource
PUT Update a resource
(The details are not important; this is just an example.) The entire shebang now has to be sent
(using an HTTP POST request) to the server. The result is probably an XML file, but it will be
embedded, as the "payload", inside a SOAP response envelope.
And with REST? The query will probably look like this:
http://www.acme.com/phonebook/UserDetails/12345
RESTFUL SERVICE
Advantages of Restful services
1. Uniform Interface Resource request invocation is done in
{get,post,put} methods of http
2. Easy to access by using URI
3. Interoperable -> Any platform which has support for http library can
provide or consume Restful services . .net app can easily
communicate with java app
4. Stateless -> Every request from client to server for the resource is
treated as a new request which carries server details every time
when it hits server
5. Scalability -> As the http is stateless protocol application can be
scaled to different clusters for better performance
Usability : Web services allow the business logic of many different systems to be
exposed over the Web. This gives your applications the freedom to choose the web
services that they need. Instead of re-inventing the wheel for each client, you need only
include additional application-specific business logic on the client-side.