Pros and Cons of Procedural Style WS and Document Style WS
Ravi C Kota
posted 5 years ago
I know that this question has been asked a million times in one way or the other (Myself asked this question in the past :-)). While reading the last chapter of Ivan's notes (Endpoint Design and Architecture), the author says
The entire payload of a (SOAP) request must be validated.
With procedure-style (RPC) web services, elements wrapping the RPC data does not appear
in any XML schema. This prevents validation of the payload to a procedure-style service.
Assuming that we started contract first approach, we specify the style as "RPC" and we start working on service and clients, don't we need to make sure that the body of the SOAP envelope has elements declared such a way that they can be validated against some schema. What is wrong with that? Would not that be a good idea at all, at the first place? What does the author would have meant by saying that RPC data does not appear in any XML Schema. Or am I getting confused with JAX-RPC vs RPC style of WS in JAX-WS.
Thanks & Regards, Ravi C.Kota
SCJP 5.0, OCDJWS 5.0
posted 4 years ago
As time passes by, I come to the conclusion that Document Style WS is the natural style, whereas RPC tried to make some short-cuts and by doing so, many aspects of the web service got too complex. Not sure if it answered your question .
William Butler Yeats: All life is a preparation for something that probably will never happen. Unless you make it happen.