How can clients execute remote procedures over HTTP?
HTTP makes it relatively easy for clients and servers that run on different computing platforms to communicate, but how can clients use HTTP to execute remote procedures? One approach is to send messages that encapsulate the semantics for procedure invocation.
Define messages which identify the remote procedures to execute and also include a fixed set of elements that map directly into the parameters of remote procedures. Have the client send the message to a URI designated for the procedure.
The client sends a message to a remote server process and blocks while waiting for a response. The request message identifies the procedure to be executed, and also includes a fixed set of parameters that map directly to the parameters of the remote procedure. When a message arrives at the server, a server process inspects the message, invokes the procedure (i.e. service) whose name is found in the message, and maps the message parameters directly into the service's input arguments. These tasks are usually performed by service frameworks like JAX-WS and WCF. Once the service has been invoked, it processes the client's request and returns a response. The client can then extract the results and resume execution.