Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

SOAP vs REST : xml inputs validation  RSS feed

 
A. Aka
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

We have a REST application that produces or consumes xml
On that application, we added an xsd so that we can validate the inputs sent.

My new colleagues say that if we wanted such validation we should have used SOAP instead of REST, that we are mixing SOAP and REST,...

I disagree with the same and I would like to have your thought about that

Thanks,

 
Tim Cooke
Marshal
Posts: 3632
184
Clojure IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A. Aka wrote:if we wanted such validation we should have used SOAP instead of REST

Nonsense. You can validate your input just as well with either.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Recall that a RESTful service can serve any type of resource, not just XML. Therefor validation will depend on the type of resource.

A RESTful service will always be faster than SOAP because you do not have to parse the XML SOAP request message or build an XML response.

Bill
 
A. Aka
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
creating REST resources that consume or produce XML, this do not undermine the advantage of being fast ?
Question1 : compared to SOAP ?
Question2 : compared to JSON with REST?
 
Tim Cooke
Marshal
Posts: 3632
184
Clojure IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Undermine what advantage?
 
A. Aka
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the advantage of rest being faster than SOAP
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
REST just has to do with moving resources around according to the HTTP methods and resource locating logic.

A GET operation to a REST style server just retrieves the resource - the nature of the resource makes no difference. As far as a REST server is concerned, XML and JSON are just text streams.

Bill
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!