Beruflich Dokumente
Kultur Dokumente
SOAP
SOAP is an acronym for Simple Object Access Protocol.
RESTful
REST stands for REpresentational State Transfer.
RESTful web service permits different data format such as Plain Text, HTML,
XML and JSON.
RESTful Web Services are fast because there is no strict specification like
SOAP. It consumes less bandwidth and resource.
HTTP Request
Verb- Indicate HTTP methods such as GET, POST, DELETE, PUT etc.
Request Header- Contains metadata for the HTTP Request message as keyvalue pairs. For example, client ( or browser) type, format supported by client,
format of message body, cache settings etc.
HTTP Response
Status/Response Code- Indicate Server status for the requested resource. For
example 404 means resource not found and 200 means response is ok.
Response Header- Contains metadata for the HTTP Response message as keyvalue pairs. For example, content length, content type, response date, server type
etc.
HTTP Methods
GET - Provides a read only access to a resource.
Operation
Read Only
Read Only
Read/Write
Idempotent
Idempotent
JAX-WS: for SOAP web services. The are two ways to write JAX-WS application
code: by RPC style and Document style.
import javax.jws
JAX-RS: for RESTful web services. There are mainly 2 implementation currently in
use for creating JAX-RS application: Jersey and RESTeasy.
import javax.ws.rs
JAX-RS Annotations
@Consumes: type of data the method can take as input. The data
will automatically be deserialized into a method input parameter. For
example, you can pass a wine object to the addWined() method either
as JSON or XML. The JSON or XML representation of a new wine is
automatically deserialized into the Wine object passed as an
argument to the method.
Web.xml
Entity Class
What is a Resource?
REST architecture treats every
content as a resource. These
resources can be text files,
html pages, images, videos or
dynamic business data. REST
Server simply provides access
to resources and REST client
accesses and modifies the
resources. Here each resource
is identified by URIs/ global
IDs. REST uses various
representations to represent a
resource where text, JSON,
XML. XML and JSON are the
most popular representations
of resources
Webservice Client
Postman Rest webservice testing tool.
Webservice Client
SOAP(Simple Object Access Protocol): SOAP is a XML-based protocol for accessing web services
WSDL(Web Services Description Language): WSDL is a xml document containing information about
web services such as method name, method parameter and how to access it, read more
http://www.tutorialspoint.com/wsdl/wsdl_example.htm.
WADL(Web Application Description Language): WADL is a XML description of a deployed RESTful web
application, read more https://jersey.java.net/documentation/latest/wadl.html
UDDI(Universal Description, Discovery and Integration):A directory of web service interfaces described
by WSDL, containing information about web services.
Marshalling