Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between REST and POX

I really can't get the difference between REST and POX web services. I mean, couldn't POX be considered as a REST web service with XML message definitions?

like image 434
Ahmed Emad Avatar asked Feb 04 '14 13:02

Ahmed Emad


1 Answers

It depends on what your "Plain Old XML" contains.

The thing is, POX used to be compared with SOAP. SOAP is a very specific way to do XML over (mostly) HTTP and people were already doing "plain old XML" over HTTP. SOAP got a lot of criticism because it complicated the things people were already doing with POX. But I won't go into that, what I'm trying to say is that people used POX to do RPC.

REST isn't RPC. In REST, the XML is a representation of a resource, not a message definition as in RPC. There is also a very important REST constraint that people seem to forget or ignore that imposes constraints on the returned XML: the hypermedia constraint or HATEOAS.

If you want to find out more about how POX fits in REST, I recommend reading this article: Richardson Maturity Model, steps toward the glory of REST.

like image 69
Bogdan Avatar answered Oct 15 '22 06:10

Bogdan