aleppo soap code example
Example 1: soap vs rest
RESTful supports JSON, XML,
SOAP supports only XML
REST is faster than SOAP based web services
SOAP is more secure
REST allows a greater variety of data formats,
SOAP only allows XML.
1) SOAP
- Communication happens using XML only
- Request is sent to SOAP methods
- Documentation is in WSDL (Wizdal)
- Heavy, more secure, more stable
- getting less popular
2) REST API
- Communication happens using Json, XML
- Requests are sent to API methods/urls using
- Communication happens in HTTP(Internet)
- Lightweight, stable
- Easy to develop and automate
- very popular
Example 2: advantages of soap
SOAP is both platform and language independent.
SOAP separates the encoding and communications
protocol from the runtime environment.
Web service can retrieve or receive a SOAP
user data from a remote service, and the
source’s platform information is completely
independent of each other.
Everything can generate XML, from Perl
scripts through C++ code to J2EE app servers.
It uses XML to send and receive messages.
It uses standard internet HTTP protocol.
SOAP runs over HTTP; it eliminates
firewall problems. When protocol HTTP
is used as the protocol binding, an
RPC call will be automatically assigned
to an HTTP request, and the RPC response
will be assigned to an HTTP reply.
Compared to RMI, CORBA and DCOM, SOAP
is very easy to use.
SOAP acts as a protocol to move information
in a distributed and decentralized environment.
SOAP is independent of the transport protocol
and can be used to coordinate different protocols.