Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

CS-253 Notes

James Watson
June 2015

SOAP

SOAP works by sending/receiving chunks of XML containing information on


what operations to perform and what data. This XML can be sent over a
variety of transport protocols, but more commonly HTTP. SOAP XML and
similar technologies have a number of advantages:
no communication issues
no executable code passed
XML software widely available and built into major programming platforms as APIs.
platform independent
However, the system is generally less efficient, because the packaged data is
larger and there is no persistence of connections over multiple calls. We also
are somewhat limited by not being able to send executable code, such as no
self-modifying code.

REST

An alternative to SOAP is Representational State Transfer. In this approach


we only use HTTP and the URI to specify the endpoint of the operation(s).
The actual data is in XML, but we can alternatively extend the URI to include
the operations and the parameters. This gives us the following consequences:
Must be HTTP - As we are taking the structure of URI.
Can use more HTTP operations, this is not possible in SOAP as HTTP
is optional
Accesses from web pages and forms/javascript
All this does come with disadvantages:

No enforcement - conventions are not forced and often not followed


Not always clear which operations map to which commands
Web pages - PUT DELETE operations not supported.

Java RMI

Exclusive to Java, one technology is called Remote-Method-Invocation (RMI).


This is a Java api that performs the object-oriented equivalent of remote procedure calls (RPC), with support for direct transfer of serialized java classes and
distributed garbage collection.
The basic structure of an RMI-based method call involves a client, server and a
registry. To make a call to a remote object, the client first looks up the object
it wishes to invoke a method on in the registry. The registry returns a reference
to the object on the server, which the client can use to invoke any methods that
the remote object implements.
The user communicates with the remote object via a user defined interface
that is implemented by the remote object. Remote objects can be invoked with
parameters.

You might also like